Expand description
§stratum-leptos
Leptos framework adapter for NexusStratum.
Provides idiomatic Leptos component APIs wrapping the headless
primitives from stratum-primitives with styled defaults from
stratum-components.
§What the adapter does
- Converts
stratum-primitivesstate to Leptos signals - Bridges
ComponentEventto Leptos event handlers - Generates Leptos
view!macro output fromRenderOutput - Provides Leptos-specific context providers (ThemeProvider, ToasterProvider)
§Usage
ⓘ
use stratum_leptos::*;
#[component]
fn App() -> impl IntoView {
view! {
<ThemeProvider theme=Theme::default()>
<Button variant=ButtonVariant::Primary>"Click me"</Button>
</ThemeProvider>
}
}Re-exports§
pub use adapter::StratumAdapter;pub use provider::ThemeContext;
Modules§
- adapter
- Framework adapter bridging stratum-core types to Leptos.
- provider
- Theme and toast context providers for Leptos.
Structs§
- Accordion
- Accordion
Props - Alert
Dialog - Alert
Dialog Props - Properties for the AlertDialog content.
- Badge
- Badge
Props - Properties for the styled Badge.
- Button
- Styled Button component.
- Button
Props - Properties for the styled Button component.
- Card
- Card
Props - Checkbox
- Checkbox
Props - Properties for the styled Checkbox.
- Dialog
- Dialog
Props - Properties for the Dialog content panel.
- Divider
- Divider
Props - Properties for the Divider component.
- Focus
Scope - Focus
Scope Props - Properties for FocusScope.
- Form
- Form
Field - Form
Field Props - Form
Props - Heading
- Heading
Props - Properties for the Heading component.
- Input
- Styled Input component.
- Input
Props - Properties for the styled Input component.
- Link
- Link
Props - Properties for the styled Link component.
- Popover
- Popover
Props - Properties for the styled Popover content.
- Portal
- Radio
- Radio
Props - Properties for the styled Radio button.
- Select
- Select
Props - Properties for the styled Select trigger.
- Separator
- Separator
Props - Properties for the Separator.
- Skeleton
- Skeleton
Props - Properties for the Skeleton component.
- Spinner
- Spinner
Props - Properties for the Spinner component.
- Stack
- Stack
Props - Properties for the Stack component.
- Switch
- Switch
Props - Properties for the styled Switch.
- Tab
- TabList
- TabPanel
- TabProps
- Text
- Text
Props - Properties for the styled Text component.
- Textarea
- Textarea
Props - Properties for the styled Textarea component.
- Theme
- A complete theme definition for NexusStratum.
- Toast
- Toast
Props - Properties for a single Toast notification.
- Tooltip
- Tooltip
Props - Properties for the styled Tooltip.
- Visually
Hidden
Enums§
- Badge
Variant - Badge visual variant.
- Button
Variant - Visual variant of the button.
- Size
- Standard size enum used by most components.
- Toast
Variant - Toast variant determines the visual style.