Menu

Table

Essence Plus

This component is only available in the Plus version of Essence UI.

Upgrade to Plus
NameTitleEmailRole
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
John DoeFront-end Developer[email protected]Owner
Displaying items 1-16 of 365 in total
Next »
div(class: "w-full rounded-sm border overflow-scroll") do
  render Components::Table.new do |table|
    table.head do
      table.column { "Name" }
      table.column { "Title" }
      table.column { "Email" }
      table.column { "Role" }
    end

    table.body do
      12.times do
        table.row do
          table.cell { "John Doe" }
          table.cell { "Front-end Developer" }
          table.cell { "[email protected]" }
          table.cell { "Owner" }
        end
      end
    end
    table.caption do
      div(class: "border-t w-full flex items-center justify-between text-xs py-2 px-4") do
        div(class: "text-gray-500") { "Displaying items 1-16 of 365 in total" }
        div(class: "text-gray-800") { "Next »" }
      end
    end
  end
end

Installation

Add the component to your project

CLI

Run the following command in your terminal

bundle exec essence add table
Manually

Add the following code and libraries into your project

Essence Plus

This component is only available in the Plus version of Essence UI.

Upgrade to Plus