Table API
API reference docs for the Stash Table
component. Learn about the props, CSS, and other APIs of this exported module.
Import
ts
import Table from '@leaflink/stash/Table.vue';
Props
Name | Type | Default | Description |
---|---|---|---|
density | SpacingDensities | undefined | Controls the Table's padding; the default value is "comfortable". On small screens, "compact" density is applied regardless of this prop's value. |
emptyStateText | string | '' | Sets the text for the empty state; the default value is "No Results". |
hasActions | boolean | false | Styles the last column for "row actions" |
hasCustomExpandToggle | boolean | false | If true, hides the default expansion toggle column |
isEmpty | boolean | false | Shows the empty state |
isExpandable | boolean | false | Adds a toggle column for row expansion. This is primarily needed for ensuring the corresponding empty TableHeaderRow is included. |
isLoading | boolean | false | Shows the loading state |
isSelectable | boolean | false | Adds a checkbox column for selecting rows; intended for use with the `useSelection` composable. |
layout | Layouts | scroll | Sets the table layout; the default value is "scroll". |
radius | TableRadiuses | rounded | Controls the corners of the table with the "border-radius" CSS property. The default value is "rounded". |
stickyHeader | { listLength: number; maxHeight: string; } | undefined | Allows the table head to be sticky when scrolling inside the table body |
Slots
Name | Description |
---|---|
head | head |
empty | |
body | body |
Events
None