🏰 @statelyjs/ui
Base UI components, layout, and plugin infrastructure for Stately applications
This package provides the foundational UI layer for Stately: React components, theming, layout primitives, and the plugin runtime system. It has no knowledge of Stately's entity system or backend - those concerns live in @statelyjs/stately.
Installation
Most users should install @statelyjs/stately instead, which includes this package with the core plugin pre-configured. Use @statelyjs/ui directly when:
- Accessing the base components, layouts, or views
- Building a custom plugin
- Want fine-grained control over plugin composition
- Stately's underlying types and logic without core's entity system (would require
schemaalso)
What's Included
Components (@statelyjs/ui/components)
Styled, accessible React components built on Radix UI primitives:
- Base components: Button, Input, Select, Dialog, Dropdown, Tabs, etc.
- Form components: Field wrappers, validation states, form actions
- Layout components: Sidebar, Header, Navigation
- Utility components: Spinner, Badge, Tooltip, etc.
Layout (@statelyjs/ui/layout)
App shell with responsive sidebar navigation:
Theme (@statelyjs/ui)
Dark/light/system mode support with system preference detection:
Plugin Runtime
Infrastructure for building and composing UI plugins:
Registry System
Component and transformer registries for dynamic field rendering:
Exports
Main (@statelyjs/ui)
Components (@statelyjs/ui/components)
Base Components (@statelyjs/ui/components/base)
All shadcn/ui style components:
Form (@statelyjs/ui/form)
Hooks (@statelyjs/ui/hooks)
Layout (@statelyjs/ui/layout)
Dialogs (@statelyjs/ui/dialogs)
Utilities
Styling
Stately requires Tailwind CSS v4. Configure your app's CSS as follows:
The @source directive tells Tailwind to scan Stately packages for utility class usage, ensuring all component styles are included in your build.
Writing a Plugin
Plugins extend the UI runtime with custom functionality:
See @statelyjs/files and @statelyjs/arrow for complete plugin examples.
Peer Dependencies
react^18.0.0 || ^19.0.0react-dom^18.0.0 || ^19.0.0lucide-react^0.562.0sonner^2.0.7openapi-fetch^0.15
Optional
@uiw/react-codemirror^4.25.3 - Required for the Editor component
Related Packages
@statelyjs/stately- Full Stately runtime with core plugin and codegen@statelyjs/schema- Schema types and plugin system@statelyjs/files- File management plugin@statelyjs/arrow- Arrow/connector plugin
License
Apache-2.0
Modules
- api
- components
- components/base/accordion
- components/base/alert
- components/base/alert-dialog
- components/base/avatar
- components/base/badge
- components/base/breadcrumb
- components/base/button
- components/base/button-group
- components/base/card
- components/base/checkbox
- components/base/collapsible
- components/base/dialog
- components/base/drawer
- components/base/dropdown-menu
- components/base/empty
- components/base/field
- components/base/input
- components/base/input-group
- components/base/item
- components/base/label
- components/base/menubar
- components/base/popover
- components/base/progress
- components/base/scroll-area
- components/base/select
- components/base/separator
- components/base/sheet
- components/base/sidebar
- components/base/skeleton
- components/base/sonner
- components/base/spinner
- components/base/switch
- components/base/table
- components/base/tabs
- components/base/textarea
- components/base/toggle
- components/base/toggle-group
- components/base/tooltip
- dialogs
- extension
- feature-plugin
- hooks
- index
- lib/logging
- lib/utils
- plugin
- registry
- runtime
- theme
- utils