pub fn SpSideNavItem(_: SpSideNavItemProps) -> ElementExpand description
A single item within an SpSideNav.
Maps to <sp-sidenav-item>. label sets the item’s visible text (via the
element’s label attribute, not slotted content). value must be unique
among sibling items; pass the parent SpSideNav’s value here exactly
when this item should render selected — see SpSideNav’s doc comment for
why a matching value (not just selected) is required. selected
renders it in its highlighted/active state (e.g. to mark the current
choice in a list used as a picker); pass the same condition used to
decide SpSideNav’s value, so the attribute is already correct on the
very first render rather than only after a later selection change.
§Props
For details, see the props struct definition.