dreamstack/registry/components/tabs.ds
enzotar 1d554ae7ab feat: enhanced 14 registry components + component gallery
Registry components enhanced with proper DreamStack patterns:
- Card: conditional title/subtitle/footer via when guards, slot for children
- Button: variant as string prop, disabled support
- Dialog: when-guarded overlay, slot for content, close button
- Progress: conditional label, variant support
- Input: conditional label, error state, helper text
- Alert: variant prop, slot for custom content
- Toggle: when-guarded label display
- Toast: when-guarded visibility
- Avatar: initials with variant
- Badge: label with variant prop
- Separator: optional centered label

New components:
- Stat: dashboard metric card (label, value, change delta)
- Tabs: tab switcher supporting 2-3 tabs
- Select: button-based option selector

New example:
- component-gallery.ds (89KB): imports 12 components, uses Card+Button,
  Input+Alert, Progress, Badge+when/else, match expressions,
  Stat metrics, Toggle, Avatar, Toast, Separator, every timer

All 10 examples pass. Browser-tested with zero errors.
2026-02-26 18:25:49 -08:00

9 lines
376 B
Text

-- DreamStack Tabs Component
-- Tab switcher with active state indicator
export component Tabs(activeTab, onTab1, onTab2, onTab3, label1, label2, label3) =
row [
button label1 { click: onTab1, variant: "primary" }
button label2 { click: onTab2, variant: "secondary" }
when label3 -> button label3 { click: onTab3, variant: "secondary" }
] { variant: "tabs" }