pub struct DropdownProps {
pub class: Class,
pub trigger_class: Class,
pub menu_class: Class,
pub content_class: Class,
pub hoverable: bool,
pub dropup: bool,
pub align: SharedString,
pub title: SharedString,
pub trigger: Element,
pub items: Vec<Element>,
}
Expand description
The Dropdown
properties struct for the configuration of the component.
Fields§
§class: Class
The class attribute for the component.
trigger_class: Class
A class to apply to the trigger button.
A class to apply to the menu.
content_class: Class
A class to apply to the menu content.
hoverable: bool
A flag to indicate whether the dropdown will show up when hovering.
dropup: bool
A flag to indicate whether the dropdown menu will appear above the trigger button.
align: SharedString
The alignment of the dropdown: left
| right
.
title: SharedString
The title for the trigger button.
trigger: Element
The trigger button to be rendered.
items: Vec<Element>
The menu items to be rendered.
Implementations§
Source§impl DropdownProps
impl DropdownProps
Sourcepub fn builder() -> DropdownPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> DropdownPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building DropdownProps
.
On the builder, call .class(...)
(optional), .trigger_class(...)
(optional), .menu_class(...)
(optional), .content_class(...)
(optional), .hoverable(...)
(optional), .dropup(...)
(optional), .align(...)
(optional), .title(...)
(optional), .trigger(...)
, .items(...)
to set the values of the fields.
Finally, call .build()
to create the instance of DropdownProps
.
Trait Implementations§
Source§impl Clone for DropdownProps
impl Clone for DropdownProps
Source§fn clone(&self) -> DropdownProps
fn clone(&self) -> DropdownProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more