Table
Reusable table component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<Table caption="Data table" responsive="true" />Legacy mount name: data-component="Table".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
class | string | Optional | "" |
caption | string | Optional | "Data table" |
responsive | boolean | Optional | true |
Slots
default
Events
This component does not declare a custom event.
Source contract
Installed source: components/Table.wrn
component Table {
props {
class = ""
caption = "Data table"
responsive = true
}
view {
<div class="w-full overflow-x-auto rounded-2xl border border-slate-200 dark:border-slate-800 {class}"><table class="w-full min-w-[640px] border-collapse text-left text-sm"><caption class="sr-only">{caption}</caption><slot /></table></div>
}
}