s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All packages
Web & UI v0.57.40 New

@happyvertical/smrt-ui

Provider-free Svelte 5 components for accessible forms, agent-assisted controls, feedback, collections, charts, overlays, layouts, and themes.

Source ↗

What it gives you

Provider-free Svelte 5 components for accessible forms, agent-assisted controls, feedback, collections, charts, overlays, layouts, and themes.

  1. 01One component contract for semantics, keyboard use, state, themes, and testing
  2. 02Forms that chat, voice, tutorials, and tests can address through a consent-aware registry
  3. 03Reusable collection, table, chart, feedback, disclosure, and overlay patterns with stable row identity
  4. 04Package-owned working examples in the shared playground

The leaf of the Svelte stack

The package depends only on svelte and smrt-types, so domain packages take its primitives without depending on smrt-svelte. It owns the visual primitives and the Provider-free form controls. smrt-svelte owns the Provider-backed rich Form and the specialized inputs, and re-exports the base inputs from here. Identity views such as RoleBadge and MembershipList live here because they import no domain package.

Use canonical tokens and aliases intentionally

Five presets ship: material, glass, studio, smrt, and happyvertical. Themes use Material 3 names as canonical tokens and retain additive aliases for migration: spacing and radius aliases such as extra-small and sm, plus motion aliases from short1 through long4. Aliases preserve older consumers; new design work should name the canonical semantic token.

A shared component standard

Foundation controls use native semantics, stable server-safe IDs, and Svelte 5 bindable state. They have visible focus and validation states, reduced-motion rules, semantic design tokens, and focused accessibility tests. Every exported component root carries data-smrt-component, and internal parts carry data-smrt-part; both are public styling hooks.

Forms agents can assist with

Controls can publish their identity, meaning, options, constraints, sensitivity, and current state. An adapter may point to a field or propose a change, while the form keeps consent and secret handling explicit.

Learn how agent-assisted forms work →

Reusable collection surfaces

CollectionToolbar, CollectionList, and DataTable cover search, selection, list or grid presentation, filtering, pagination, expansion, density, and empty or loading states. DataTable keeps a stable row key through local transforms and renders footer rows and column summaries. It exposes serializable controller state when the application owns filtering, sorting, or paging.

Charts without a report dependency

Chart from /charts renders bar, line, pie, table, and stat from a structural ChartData value. A report or widget package hands it rows instead of importing a charting library. smrt-reports draws its runtime report results with it. /charts/format holds the minor-unit number formatting and loads in plain Node.

Feedback and focused tasks

Alerts, toasts, progress, meters, drawers, popovers, disclosure, and accordions share the same status, focus, keyboard, motion, and theme conventions as the form controls.

Phone surfaces and capture

PhoneSheet replaces drawers and centered modals on a phone, as a full page or a sheet that closes on a swipe. WorkingStrip shows a transport-neutral working status with pause, review, stop, and close controls. FormActionBar groups form actions and fixes them to the bottom on phones. CameraCapture and SignaturePad post their result with the native form.

One calendar entry point

CalendarView renders month and week grids in a named time zone and a phone agenda. Its date model is Svelte-free, so a route can compute day keys on the server. Calendar and DayView remain as deprecated exports; they computed days in host-local time.

Focused public imports

Import from /forms, /ui, /feedback, /data, /layout, /calendar, /charts, /chat, /i18n, /registry, and /themes. Each import then identifies the applicable foundation part. The Svelte-free /form-retry, /data-surface, /charts/format, and /themes/presets entries are safe in plain Node. Server adapters take their protocol limits from /data-surface, not from the /data component barrel. The package root remains a compatibility barrel.