@dorsk/tsumikit

Svelte 5 · pure CSS · zero deps
AppShell Principles
v0.101.0
Foundations
Typography 5 ThemeTokens 5 Theming 3 TextScaling 3 Breakpoints 1
Atoms
Artwork 3 Avatar 3 Badge 4 Button 8 Card 6 Checkbox 4 Divider 3 Dot 3 Gauge 4 Heading 3 Icon 4 Input 4 Kbd 3 Link 5 Progress 5 Scrim 3 SegmentedProgress 3 Select 3 Skeleton 5 Slider 3 Spinner 4 Swatch 3 Switch 4 Text 5 Textarea 5 Thinking 2 TimeDisplay 3
Molecules
Accordion 3 AttachmentList 3 Breadcrumb 3 ButtonGroup 3 Callout 3 CapBar 3 Carousel 3 ChatBubble 4 CodeBlock 4 Combobox 3 Composer 3 ConfirmModal 3 CopyButton 4 Disclosure 4 Drawer 3 Dropzone 3 EmojiPicker 3 EmptyState 4 Field 4 Fieldset 4 FileButton 3 FilterChips 6 FilterInput 4 FontScalePicker 3 GitRef 3 GlyphStack 3 IconButton 4 InputGroup 3 KeyValue 3 LoadMore 3 LookPicker 3 Menu 4 Meter 4 Metric / StatTile 4 Modal 3 MotionSettings 3 NotificationItem 2 OptionButton 3 Pagination 4 Popover 3 Prose 6 PullToRefresh 3 RadialMenu 3 RadioGroup 4 RichSelect 3 SectionHeader 3 SeekSlider 4 SegmentedControl 7 SelectButton 3 SortableList 4 SoundSettings 3 SplitButton 3 StatusBar 3 SwipeRow 3 Tabs 6 ThemePicker 3 Timestamp 3 Toaster 6 Toggle 3 Tooltip 3 Truncate 3 VolumeSlider 3 WorkingDir 3
Organisms
ConversationFeed 3 ConversationPanel 3 DataTable 9 FilterSearchBar 4 NotificationCenter 5
Layouts
AppShell 3 Backdrop 3 Container 3 Stack 4 Cluster 4 AutoGrid 3 MasterDetail 4 ResizablePanel 4 NavSection 3 NavItem 4 NavBar 4 TabBar 4 Toolbar 5

DataTable

organisms

A typed, generic table: column accessors and cell snippets, sorting, row tones and hover actions, loading and empty states, and a card layout once its own box gets narrow.

See also FilterSearchBarKeyValuePaginationLoadMore

Service fleet

cellSnippets for the status badge, rowTone accent bars, hover rowActions, onrowclick, and layout="fixed" with truncate and hideBelow.

ServiceRoleRegionCPUStatusActions
api-gatewaygatewayeu-west-123% ok
worker-02workereu-west-187% warn
cache-01cacheus-east-14% danger
postgres-primarydatabaseeu-west-138% ok
media-transcodeserviceap-northeast-164% ok
search-indexserviceus-east-155% warn
Click a row to open the service; drag the handle to drop columns.

Density and chrome

size="md" | "sm", headerSnippets replaces a column header (a unit badge), hideHeader keeps the header for assistive tech only, stickyHeader inside a bounded height.

Comfortable (size="md")
ServiceRegionMemory RSS
api-gatewayeu-west-1412 MB
worker-02eu-west-11.9 GB
cache-01us-east-17.7 GB
Compact (size="sm")
ServiceRegionMemory
api-gatewayeu-west-1412 MB
worker-02eu-west-11.9 GB
cache-01us-east-17.7 GB
Headerless list (hideHeader)
ServiceRegionMemory
api-gatewayeu-west-1412 MB
worker-02eu-west-11.9 GB
cache-01us-east-17.7 GB
Sticky header in an 8rem scroller
ServiceRegionMemory
api-gatewayeu-west-1412 MB
worker-02eu-west-11.9 GB
cache-01us-east-17.7 GB
postgres-primaryeu-west-115.4 GB
media-transcodeap-northeast-12.2 GB
search-indexus-east-13.2 GB

States

loading with no rows renders loadingRows skeleton rows at the height of data rows; loading over existing rows trails one; empty as a string or a snippet, onloadmore footer, and a long unbroken name in a fixed layout.

Loading fleet…
ServiceRegion
ServiceRegion
api-gatewayeu-west-1
worker-02eu-west-1
cache-01us-east-1
postgres-primaryeu-west-1
Loading fleet…
ServiceRegion
ServiceRegion
api-gatewayeu-west-1
worker-02eu-west-1
cache-01us-east-1
postgres-primaryeu-west-1
Refreshing fleet…
ServiceRegion
api-gatewayeu-west-1
worker-02eu-west-1
ServiceRegion
No services deployed yet.
ServiceRegion

No services match

Clear the region filter to see all six.

ServiceRegion
api-gatewayeu-west-1
worker-02eu-west-1
ServiceRegion
eu-west-1-analytics-warehouse-rebuild-overnight-batch-worker-pool-07eu-west-1
worker-02eu-west-1

Sorting

sortable columns sort by the displayed value; pass onsort to own the order (server-side) and the table only shows the indicator.

Client-side
api-gateway2341
worker-02873
cache-0140
postgres-primary38120
media-transcode6412
search-index557
Caller-owned (onsort) · GET /services
api-gateway2341
worker-02873
cache-0140
postgres-primary38120
media-transcode6412
search-index557

Selection mode

selectable with bind:selected and bind:selecting: checkboxes and the floating selection bar exist only while selecting; a row click toggles the row, Escape or Done leaves. The row menu gains a trailing Select item.

6 services
ServiceRegionActions
api-gatewayeu-west-1
worker-02eu-west-1
cache-01us-east-1
postgres-primaryeu-west-1
media-transcodeap-northeast-1
search-indexus-east-1

Responsive cards

responsive="stack" turns rows into cards under stackBelow (30rem of its own width); Column.role places title, meta, detail and hidden cells. Drag the handle.

ServiceStatusRegionCPUMemoryIdActions
api-gateway ok eu-west-123%412 MB1
worker-02 warn eu-west-187%1.9 GB2
cache-01 danger us-east-14%7.7 GB3
postgres-primary ok eu-west-138%15.4 GB4

Stacked card details

Always stacked in a 22rem box: stackLabel: false joins metas on one · line and skips empty cells; stackActions="end" closes each card with its actions.

ServiceRoleRegionIdActions
api-gateway-with-a-long-unbroken-name-for-the-eu-edgegateway#1
worker-02workereu-west-1#2
postgres-primarydatabaseeu-west-1#4

Row tone × size matrix

Regression fixture: every rowTone at both sizes, with alignments and a nowrap column.

LeftCenterRight
rowTone="neutral"neutral128
rowTone="ok"ok256
rowTone="warn"warn384
rowTone="danger"danger512
rowTone="info"info640
LeftCenterRight
rowTone="neutral"neutral128
rowTone="ok"ok256
rowTone="warn"warn384
rowTone="danger"danger512
rowTone="info"info640

Row actions

actions returns the row actions as data: the first inlineActions (default 1) are icon buttons, the rest sit in the "more" menu. Touch and stacked cards keep one inline whatever inlineActions says.

ServiceRoleRegionActions
api-gatewaygatewayeu-west-1
worker-02workereu-west-1
cache-01cacheus-east-1
postgres-primarydatabaseeu-west-1
ServiceRoleRegionActions
api-gatewaygatewayeu-west-1
worker-02workereu-west-1
cache-01cacheus-east-1
postgres-primarydatabaseeu-west-1
Hover or focus a row to reveal its actions; on touch they stay visible.

Props

PropTypeDefaultDescription
columns required Column<T>[]—
rows required T[]—
rowKey required (row: T) => string | number—Stable key for each row (for keyed iteration).
onrowclick (row: T) => void—
onsort (key: string, dir: 'asc' | 'desc') => void—Supply to take over ordering (server-side / custom sort). When set, the table only reflects the indicator and emits; it does not reorder rows.
cellSnippets Record<string, Snippet<[T]>>{}
headerSnippets Record<string, Snippet<[Column<T>]>>{}Replaces a column's header content (e.g. a select-all checkbox).
empty string | Snippet'No data.'
stickyHeader booleanfalseSticks within the table's own scroller, which also scrolls horizontally, so it only sticks when the table has a bounded height (e.g. `style="max-height: 60vh"`), not to the page.
stickyOffset string—Distance from the scroller's top for the sticky header. Defaults to 0.
layout 'auto' | 'fixed''auto'`fixed` makes declared column widths authoritative (needed for truncate).
hideHeader booleanfalseVisually hides the header; it stays in the DOM for assistive tech.
size 'sm' | 'md''md'
rowTone (row: T) => RowTone | undefined—Per-row semantic tone, rendered as a left accent bar + `data-tone`.
rowClass (row: T) => string | undefined—
rowActions Snippet<[T]>—Trailing actions cell revealed on hover/focus (always visible on touch).
rowActionsLabel string'Actions'
actions (row: T) => RowAction[]—Data-driven row actions: the first `inlineActions` render as icon buttons, the rest in a "more" menu. Rendered after `rowActions` when both are set.
inlineActions number1Inline action count (default 1). Coarse pointers and stacked cards cap it at 1.
moreLabel string'More actions'Accessible name of the "more" menu trigger; the row's name is appended.
selectable booleanfalseEnables selection mode. With `actions`, each row menu gains a trailing "Select" item that enters it with that row selected.
selected bindable (string | number)[][]Bindable row keys (`rowKey`) of the selected rows. Cleared on leaving selection mode.
selecting bindable booleanfalseBindable. While true the checkbox column and the selection bar show, a row click toggles the row instead of `onrowclick`, and Escape leaves.
selectionActions Snippet<[T[]]>—Bulk actions in the selection bar; receives the selected rows.
selectionLabel (count: number) => string(n) => `${n} selected`
selectLabel string'Select'Label of the row menu item that enters selection mode.
selectRowLabel (row: T) => string—Accessible name of a row's checkbox. Defaults to `Select <title or first column value>`.
selectAllLabel string'Select all'
selectionBarLabel string'Selection'Accessible name of the selection bar.
doneLabel string'Done'
loading booleanfalseWith no rows: `loadingRows` skeleton rows at the height of a data row. With rows: the rows stay and one skeleton row trails them.
loadingLabel string'Loading…'Announced to assistive tech while loading (visually hidden).
loadingRows number5
onloadmore () => void—Renders a footer "load more" button that calls this.
loadMoreLabel string'Load more'
responsive 'scroll' | 'stack''scroll'`stack` renders each row as a card once the table's own box is narrower than `stackBelow`; `scroll` (default) keeps a horizontal scroller.
stackBelow string'48rem'Width (px/em/rem) under which `stack` mode kicks in.
stackActions 'start' | 'end''start'Where actions sit in a stacked card: `start` beside the title (wraps under a long one), `end` always closing the card.
class string''
style string''
tableClass string''Class on the inner <table>.
MIT · @dorsk/tsumikit