Table

Tables are used to display data in a tabular format.

Customer Items Status
John Doe Apple iPhone 14 Pro
Active
Jane Doe Apple iPhone 14 Pro
Active
Matthew Stone Apple iPhone 14 Pro
Active
Andrew Yellow Apple iPhone 14 Pro
Active
Harry Blue Apple iPhone 14 Pro
Active

/* table-example.blade.php */

<x-table>
<x-slot name="head">
<x-tr>
<x-th content="Customer">
<x-th content="Items">
<x-th content="Status">
</x-tr>
</x-slot>
<x-slot name="body">
<x-tr>
<x-td content="John Doe">
<x-td content="Apple iPhone 14 Pro">
<x-td>
<div class="flex justify-between items-center">
<x-badge color="green" size="xs">
Active
</x-badge>
<x-dropdown>
<x-slot name="trigger">
<x-button size="xs" color="transparent" class="py-4">
<x-radix-dots-vertical class="w-4 h-4 text-zinc-500">
</x-button>
</x-slot>
<x-dropdown-item content="View">
<x-dropdown-item content="Edit">
<x-dropdown-item content="Delete">
</x-dropdown>
</div>
</x-td>
</x-tr>
...
</x-slot>
</x-table>

Component API

Table

Prop Description Values
size Change the font size of the component Dependant on theme
head Set the content for the header Slot
body Set the content for the body Slot
foot Set the content for the footer Slot

tr

Prop Description Values
as Change the element tag of the component any
color Change the color of the component Dependant on theme

th

Prop Description Values
as Change the element tag of the component any
content Set the content of the component any
color Change the color of the component Dependant on theme
align Change the alignment of the component Dependant on theme

td

Prop Description Values
as Change the element tag of the component any
content Set the content of the component any
color Change the color of the component Dependant on theme
align Change the alignment of the component Dependant on theme