pub struct SidebarLayoutProps {
pub items: Vec<SidebarLayoutItem>,
pub data_path: Option<String>,
pub active: String,
pub aria_label: Option<String>,
}Expand description
Props for SidebarLayout — a two-column layout with a sticky vertical nav
on the left and a main content slot on the right. Replaces the common
pattern of opener/closer RawHtml blocks faking asymmetric grids.
The element’s children IDs render inside the main slot. Each child is
expected to carry its own visible rule keyed against active (typically
{ path: "/active_tab", operator: "eq", value: "<slug>" }) so only the
matching section is in the DOM at a time.
On mobile (below md), the sidebar collapses into a horizontally
scrollable strip above the main content, and the asymmetric grid layout
flattens to a single column.
Use cases: settings pages with many sections, account dashboards, onboarding wizards with persistent navigation, admin consoles.
Fields§
§items: Vec<SidebarLayoutItem>Literal sidebar items. Skipped when empty; data_path is the fallback.
data_path: Option<String>JSON Pointer into runtime data resolving to an array of SidebarLayoutItems.
active: StringSlug of the currently-active item. Matched against SidebarLayoutItem.slug.
Typically bound via { "$data": "/active_tab" }.
aria_label: Option<String>Accessible label for the nav (<nav aria-label="...">).
Trait Implementations§
Source§impl Clone for SidebarLayoutProps
impl Clone for SidebarLayoutProps
Source§fn clone(&self) -> SidebarLayoutProps
fn clone(&self) -> SidebarLayoutProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SidebarLayoutProps
impl Debug for SidebarLayoutProps
Source§impl Default for SidebarLayoutProps
impl Default for SidebarLayoutProps
Source§fn default() -> SidebarLayoutProps
fn default() -> SidebarLayoutProps
Source§impl<'de> Deserialize<'de> for SidebarLayoutProps
impl<'de> Deserialize<'de> for SidebarLayoutProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SidebarLayoutProps
impl JsonSchema for SidebarLayoutProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SidebarLayoutProps
impl PartialEq for SidebarLayoutProps
Source§fn eq(&self, other: &SidebarLayoutProps) -> bool
fn eq(&self, other: &SidebarLayoutProps) -> bool
self and other values to be equal, and is used by ==.