Skip to content

@agala-labs/ui

Table

Displays sortable, selectable tabular records with loading and empty states.

Examples

Default
Select all rows
RoleStatus
Select row 1
Ada LovelaceOwnerActive
Select row 2
Grace HopperMaintainerActive
Select row 3
Edsger DijkstraReviewerInvited
<AgalaTable :columns="columns" :rows="members" row-key="id" />

Import

import { AgalaTable } from '@agala-labs/ui'

API

PropTypeDefaultDescription
columnsTableColumn[]Definitions support width, minWidth, alignment, and sorting.
rowsRecord<string, unknown>[]Required records.
rowKeystringUnique record key.
variant'default' | 'clean' | 'minimal'Border and surface treatment.
density'comfortable' | 'compact''comfortable'Row spacing.
selectablebooleanfalseEnables row selection.
selectedRowsstring[]Selected keys.
sortKey / sortDirstring / 'asc' | 'desc'Controlled sorting.
interactiveRowsbooleanfalseAdds keyboard row activation.
stickyHeader / stickyFirstColumnbooleanfalsePins context inside the table scroller.
loading / loadingRowsboolean / numberfalse / 5Shows a deterministic loading layout.
emptyMessagestringEmpty collection copy.

Events

  • update:selectedRows
  • update:sortKey
  • update:sortDir
  • row-click(row)

Slots

  • cell-<key>
  • empty
  • footer

Accessibility

Uses semantic table markup, announces sorting and selection, and makes rows keyboard-operable only when interactiveRows is enabled.

Released under the MIT License.