pub struct PopoverProps {
pub id: Option<Cow<'static, str>>,
pub trigger: Option<Markup>,
pub placement: PopoverPlacement,
pub offset_px: f64,
pub arrow: bool,
pub class: Option<Cow<'static, str>>,
pub attrs: AttrMap,
pub children: Children,
}Expand description
Popover — maps to CSS class .popover on a <details> element.
Upstream basecoat uses a <details> root containing a <summary> trigger
and a <div role="dialog"> content panel. The WASM controller wires
floating-ui positioning, click-outside dismissal, and aria-expanded sync
onto that markup.
The id is required by the WASM controller so trigger/content pairs can be
looked up unambiguously and so accessible-name attributes (aria-controls,
aria-labelledby) can target the right elements.
Fields§
§id: Option<Cow<'static, str>>Unique DOM id — required for the WASM controller.
trigger: Option<Markup>Trigger content placed inside the <summary> element.
placement: PopoverPlacementFloating-ui placement (default bottom).
offset_px: f64Distance in pixels between the trigger edge and the content panel.
arrow: boolWhether to render a <div data-popover-arrow> element inside the
content. The visual arrow is CSS-positioned in v0.2 — see crate docs.
class: Option<Cow<'static, str>>Extra CSS classes appended after the popover class.
attrs: AttrMap§children: ChildrenPopover content (rendered inside the <div role="dialog">).
Implementations§
Source§impl PopoverProps
impl PopoverProps
pub const __BASECOAT_EXTEND_FIELD: Option<&'static str>
Sourcepub fn builder() -> PopoverPropsBuilder
pub fn builder() -> PopoverPropsBuilder
Create a builder for this prop struct.
Trait Implementations§
Source§impl Clone for PopoverProps
impl Clone for PopoverProps
Source§fn clone(&self) -> PopoverProps
fn clone(&self) -> PopoverProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more