Skip to main content

Crate stratum_leptos

Crate stratum_leptos 

Source
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-primitives state to Leptos signals
  • Bridges ComponentEvent to Leptos event handlers
  • Generates Leptos view! macro output from RenderOutput
  • 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
AccordionProps
AlertDialog
AlertDialogProps
Properties for the AlertDialog content.
Badge
BadgeProps
Properties for the styled Badge.
Button
Styled Button component.
ButtonProps
Properties for the styled Button component.
Card
CardProps
Checkbox
CheckboxProps
Properties for the styled Checkbox.
Dialog
DialogProps
Properties for the Dialog content panel.
Divider
DividerProps
Properties for the Divider component.
FocusScope
FocusScopeProps
Properties for FocusScope.
Form
FormField
FormFieldProps
FormProps
Heading
HeadingProps
Properties for the Heading component.
Input
Styled Input component.
InputProps
Properties for the styled Input component.
Link
LinkProps
Properties for the styled Link component.
Popover
PopoverProps
Properties for the styled Popover content.
Portal
Radio
RadioProps
Properties for the styled Radio button.
Select
SelectProps
Properties for the styled Select trigger.
Separator
SeparatorProps
Properties for the Separator.
Skeleton
SkeletonProps
Properties for the Skeleton component.
Spinner
SpinnerProps
Properties for the Spinner component.
Stack
StackProps
Properties for the Stack component.
Switch
SwitchProps
Properties for the styled Switch.
Tab
TabList
TabPanel
TabProps
Text
TextProps
Properties for the styled Text component.
Textarea
TextareaProps
Properties for the styled Textarea component.
Theme
A complete theme definition for NexusStratum.
Toast
ToastProps
Properties for a single Toast notification.
Tooltip
TooltipProps
Properties for the styled Tooltip.
VisuallyHidden

Enums§

BadgeVariant
Badge visual variant.
ButtonVariant
Visual variant of the button.
Size
Standard size enum used by most components.
ToastVariant
Toast variant determines the visual style.