Caption Side
Controls the caption element orientation in a table.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
| Class | Style |
|---|---|
cs-t | caption-side: top; |
cs-b | caption-side: bottom; |
Top
Initial value
The caption will be displayed above the table.
| A | B | C |
<table class="b-1 b-d bc-c bc-slate ta-c w-full"> <caption class="cs-t bg-black"> Top Caption </caption> <tbody> <tr> <td class="b-1 b-d bc-slate p-3 tc-slate">A</td> <td class="b-1 b-d bc-slate p-3 tc-slate">B</td> <td class="b-1 b-d bc-slate p-3 tc-slate">C</td> </tr> </tbody></table>Bottom
The caption will be displayed below the table.
| A | B | C |
<table class="b-1 b-d bc-c bc-slate ta-c w-full"> <caption class="cs-b bg-black"> Bottom Caption </caption> <tbody> <tr> <td class="b-1 b-d bc-slate p-3 tc-slate">A</td> <td class="b-1 b-d bc-slate p-3 tc-slate">B</td> <td class="b-1 b-d bc-slate p-3 tc-slate">C</td> </tr> </tbody></table>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Targeting different viewports
You can combine responsive breakpoints like sm:cs-*, md:cs-*, lg:cs-*, and xxl:cs-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:cs-* utility to override elements and change their values when hovering over them.