pub struct SiteHeaderProps {
pub brand: Option<Element>,
pub actions: Option<Element>,
pub collapse: SiteHeaderCollapse,
pub menu_label: String,
pub close_label: String,
pub nav_label: String,
pub sticky: bool,
pub id: Option<String>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Props for SiteHeader.
Fields§
§brand: Option<Element>Logo lockup, usually a link to the home page.
actions: Option<Element>Theme toggle, repository link, or call to action. Collapses with the navigation.
collapse: SiteHeaderCollapseHow the navigation and actions collapse below 40rem: Panel opens them inline below the
brand; Sheet opens them in an off-canvas native popover from the inline-end edge.
Accessible name of the collapsed-menu toggle. Defaults to Menu.
close_label: StringAccessible name of the close button inside the open sheet. Defaults to Close menu. Used
with collapse: SiteHeaderCollapse::Sheet.
Accessible name of the primary navigation landmark. Defaults to Main.
sticky: boolKeeps the header pinned to the top of the viewport while the page scrolls.
id: Option<String>Header id; the menu panel id is {id}-panel. Generated when unset.
class: Option<String>Extra classes appended after the Lumen classes.
attributes: Vec<Attribute>Any other <header> or global attribute.
children: ElementThe primary navigation links.
Implementations§
Source§impl SiteHeaderProps
impl SiteHeaderProps
Sourcepub fn builder() -> SiteHeaderPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> SiteHeaderPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building SiteHeaderProps.
On the builder, call .brand(...)(optional), .actions(...)(optional), .collapse(...)(optional), .menu_label(...)(optional), .close_label(...)(optional), .nav_label(...)(optional), .sticky(...)(optional), .id(...)(optional), .class(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SiteHeaderProps.
Trait Implementations§
Source§impl Clone for SiteHeaderProps
impl Clone for SiteHeaderProps
Source§impl PartialEq for SiteHeaderProps
impl PartialEq for SiteHeaderProps
Source§impl Properties for SiteHeaderPropswhere
Self: Clone,
impl Properties for SiteHeaderPropswhere
Self: Clone,
Source§type Builder = SiteHeaderPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
type Builder = SiteHeaderPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for SiteHeaderProps
Auto Trait Implementations§
impl !Freeze for SiteHeaderProps
impl !RefUnwindSafe for SiteHeaderProps
impl !Send for SiteHeaderProps
impl !Sync for SiteHeaderProps
impl !UnwindSafe for SiteHeaderProps
impl Forget for SiteHeaderProps
impl Move for SiteHeaderProps
impl Unpin for SiteHeaderProps
impl UnsafeUnpin for SiteHeaderPropswhere
*const RcInner<VNodeInner> is !null: UnsafeUnpin,
PhantomData<RcInner<VNodeInner>>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more