pub struct DropdownMenuProps {
pub show: bool,
pub align_end: bool,
pub tag: String,
pub class: String,
pub style: String,
pub children: Element,
/* private fields */
}Expand description
Standalone Bootstrap dropdown menu.
Use this when open/position behavior is owned by a surrounding component but the menu and items should still use Bootstrap dropdown structure.
Fields§
§show: boolWhether to show the menu.
align_end: boolAlign menu to the end side.
tag: StringMenu element. Empty (the default) renders <ul>, whose children are the
<li>-wrapped DropdownItem/DropdownDivider forms; "div" renders
<div class="dropdown-menu">, which takes the bare forms
(DropdownItem { tag: "div" }) and, unlike a <ul>, may also hold
arbitrary content.
Bootstrap documents both, and the generic form is the one its own “forms
and text inside a dropdown” examples use. It is the only legal choice when
the menu holds anything that is not a menu item — a <div> or a <p> is
not a valid child of <ul>.
class: StringAdditional CSS classes.
style: StringInline style, appended to the component’s own. Declared explicitly rather
than left to the attribute spread because this element always sets
style itself; see the composition note in the body.
children: ElementChild menu items.
Implementations§
Source§impl DropdownMenuProps
impl DropdownMenuProps
Sourcepub fn builder() -> DropdownMenuPropsBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> DropdownMenuPropsBuilder<((), (), (), (), (), (), ())>
Create a builder for building DropdownMenuProps.
On the builder, call .show(...)(optional), .align_end(...)(optional), .tag(...)(optional), .class(...)(optional), .style(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of DropdownMenuProps.
Trait Implementations§
Source§impl Clone for DropdownMenuProps
impl Clone for DropdownMenuProps
Source§fn clone(&self) -> DropdownMenuProps
fn clone(&self) -> DropdownMenuProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more