Tables
Tables have the following properties:
Property | Required? | Type | Options | Description |
---|---|---|---|---|
headBg | no | string |
|
Background color of the Table's Head. |
id | no | string | Value of the id attribute for the Table. | |
outerBorder | no | string | Color of the Outer Border. Also sets the theme for the table. |
Basic Examples
Basic Switch example.
1<x-fcui-table> 2 <x-slot:head> 3 <th scope="col" class="font-medium px-6 py-4 text-left"> 4 ID 5 </th> 6 <th scope="col" class="font-medium px-6 py-4 text-left"> 7 Name 8 </th> 9 <th scope="col" class="font-medium px-6 py-4 text-left">10 Email11 </th>12 <th scope="col" class="font-medium px-6 py-4 text-left">13 Status14 </th>15 </x-slot:head>16 17 <x-slot:rows>18 <x-fcui-table-row>19 <td class="px-6 py-4 whitespace-nowrap">20 121 </td>22 <td class="font-light px-6 py-4 whitespace-nowrap">23 Mark24 </td>25 <td class="font-light px-6 py-4 whitespace-nowrap">26 Otto27 </td>28 <td class="font-light px-6 py-4 whitespace-nowrap">29 @mdo30 </td>31 </x-fcui-table-row>32 </x-slot:rows>33 34</x-fcui-table>
ID | Name | Status | |
---|---|---|---|
1 | Mark | mark@example.com | Active |
Advanced Example
Table with a success type and an id.
1<x-fcui-table headBg="success" id="table1"> 2 <x-slot:head> 3 <th scope="col" class="font-medium px-6 py-4 text-left"> 4 ID 5 </th> 6 <th scope="col" class="font-medium px-6 py-4 text-left"> 7 Name 8 </th> 9 <th scope="col" class="font-medium px-6 py-4 text-left">10 Email11 </th>12 <th scope="col" class="font-medium px-6 py-4 text-left">13 Status14 </th>15 </x-slot:head>16 17 <x-slot:rows>18 <x-fcui-table-row rowStyle="success">19 <td class="px-6 py-4 whitespace-nowrap">20 121 </td>22 <td class="font-light px-6 py-4 whitespace-nowrap">23 Mark24 </td>25 <td class="font-light px-6 py-4 whitespace-nowrap">26 mark@example.com27 </td>28 <td class="font-light px-6 py-4 whitespace-nowrap">29 Active30 </td>31 </x-fcui-table-row>32 33 <x-fcui-table-row rowStyle="success">34 <td class="px-6 py-4 whitespace-nowrap">35 136 </td>37 <td class="font-light px-6 py-4 whitespace-nowrap">38 Mark39 </td>40 <td class="font-light px-6 py-4 whitespace-nowrap">41 mark@example.com42 </td>43 <td class="font-light px-6 py-4 whitespace-nowrap">44 Active45 </td>46 </x-fcui-table-row>47 </x-slot:rows>48 49</x-fcui-table>
ID | Name | Status | |
---|---|---|---|
1 | Mark | mark@example.com | Active |
2 | Tom | tom@example.com | Inactive |