pub struct SidebarProps<'__a> {
pub open: Expr<bool>,
pub mobile_open: Expr<bool>,
pub side: SidebarSide,
pub variant: SidebarVariant,
pub collapsible: SidebarCollapsible,
pub attrs: Attributes,
pub sheet_attrs: Attributes,
pub child: Child<'__a>,
}Expand description
A desktop panel that becomes a sheet over the page below md (48rem).
The --sidebar-* theme tokens control its colors independently of cards,
sheets and page content. Nested controls inherit the sidebar palette.
open controls desktop expansion. mobile_open independently controls
the mobile sheet, so it can start closed while desktop starts expanded.
Pass runtime expressions reading the caller’s signals to make both live.
Header, content and footer children are rendered once and shared between
viewport sizes, preserving their inputs and signal identities.
attrs apply to the outer wrapper. sheet_attrs apply to the sheet and
accept a label, an ID, and event handlers for Escape or backdrop dismissal.
Include a close button in the mobile header. Like sheet, this is a
visual overlay; focus trapping requires additional application scripting.
Fields§
§open: Expr<bool>§mobile_open: Expr<bool>§side: SidebarSide§variant: SidebarVariant§collapsible: SidebarCollapsible§attrs: Attributes§sheet_attrs: Attributes§child: Child<'__a>Implementations§
Source§impl<'__a> SidebarProps<'__a>
impl<'__a> SidebarProps<'__a>
Sourcepub fn builder() -> SidebarPropsBuilder<'__a>
pub fn builder() -> SidebarPropsBuilder<'__a>
Returns a SidebarPropsBuilder with no properties set.