pub struct NavigationMenuRoot { /* private fields */ }Expand description
A composable, Radix-shaped navigation-menu configuration surface.
This mirrors Radix’s exported part names (Root, List, Item, Trigger, Content, Link,
Indicator, Viewport) but models outcomes rather than DOM APIs.
Implementations§
pub fn new(model: Model<Option<Arc<str>>>) -> Self
Sourcepub fn new_controllable<H: UiHost>(
cx: &mut ElementContext<'_, H>,
controlled: Option<Model<Option<Arc<str>>>>,
default_value: impl FnOnce() -> Option<Arc<str>>,
) -> Self
pub fn new_controllable<H: UiHost>( cx: &mut ElementContext<'_, H>, controlled: Option<Model<Option<Arc<str>>>>, default_value: impl FnOnce() -> Option<Arc<str>>, ) -> Self
Creates a root with a controlled/uncontrolled selection model (Radix value /
defaultValue).
pub fn model(&self) -> Model<Option<Arc<str>>>
pub fn config(self, config: NavigationMenuConfig) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn context<H: UiHost>( &self, cx: &mut ElementContext<'_, H>, root_id: GlobalElementId, ) -> NavigationMenuContext
pub fn trigger(&self, value: impl Into<Arc<str>>) -> NavigationMenuTrigger
pub fn content(&self, value: impl Into<Arc<str>>) -> NavigationMenuContent
pub fn link(&self) -> NavigationMenuLink
Trait Implementations§
Source§fn clone(&self) -> NavigationMenuRoot
fn clone(&self) -> NavigationMenuRoot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more