@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

FilterSearchBar

organisms

A structured search bar over a small query language: type role:worker cpu>=50 by hand or build it from the schema-driven dropdown, get removable chips and a parsed AST to run anywhere.

See also FilterInputDataTableComboboxInput

Fleet search

bind:value holds the raw query; parse gives the AST that compilePredicate runs in memory and toSql hands to a backend. Click a preset or type role:… by hand.

Status is not ok
ServiceRoleRegionCPU %Status
worker-02workereu-west-187warn
cache-01cacheus-east-14danger
search-indexserviceus-east-155warn
sql
SELECT * FROM services
WHERE status <> 'ok';

Sizes, shapes and surfaces

size="sm" | "md" | "lg", shape="pill", surface="raised" | "sunken", font="sans" for a plain search box; grow fills a toolbar row.

Role is cache
Status is warn
Region is us-east-1

States

empty with a placeholder, hotkey="s" with showHotkey, autoQuote off, showChips off, an unknown field kept as free text, and a long query wrapping its chips.

s
Service includes api
text owner:platform cache
Role is worker Status is not ok Region is eu-west-1 CPU % greater or equal 40 Uptime (days) less than 30 Service includes media-transcode-pipeline-eu-west-1-blue Service includes search-index

One query, three outputs

onchange(query, raw) fires the AST on every edit; serialize normalises it, toSql compiles it, compilePredicate runs it, filters lists the leaves.

Role any of worker, cache CPU % greater or equal 60
Normalised
∅
Filters
∅
Matches
api-gateway, worker-02, cache-01, postgres-primary, media-transcode, search-index
SQL
SELECT * FROM services WHERE TRUE;

Props

PropTypeDefaultDescription
schema required Schema—
value bindable string''The raw textual query (two-way bindable).
placeholder string'artist:"Daft Punk" AND year>=2000'
showChips booleantrueRender the parsed, removable filter chips under the bar.
autoQuote booleantrueWhen a string field's value step opens (`title:`), auto-insert a `""` pair with the caret inside so multi-word values stay together; Tab exits the quotes. Set false for bare typing where spaces split the value.
size ControlSize'md'Forwarded to FilterInput.
shape 'square' | 'pill''square'
surface 'base' | 'raised' | 'sunken''base'
font 'mono' | 'sans''mono'`sans` renders the typed text and placeholder in `--font-sans`; chips stay mono.
hotkey string—
showHotkey booleanfalse
grow booleanfalse
onchange (query: Query, raw: string) => void—Fires the parsed AST on every change — feed this to your backend.
onsubmit (value: string) => void—Fires on Enter / clear / chip-remove with the raw query string.
class string''
style string''
MIT · @dorsk/tsumikit