pub struct EuvToggleGroupProps {
pub items: Vec<EuvToggleGroupItem>,
pub values: Signal<Vec<String>>,
pub multiple: bool,
pub collapsible: bool,
pub variant: EuvToggleVariant,
pub size: EuvToggleSize,
pub on_change: Option<Rc<dyn Fn(Vec<String>)>>,
}Expand description
Props for the euv_toggle_group component.
The selection lives in a caller-owned Signal<Vec<String>> so the
control takes part in two-way binding with the rest of the page. A
single-selection group keeps one value in it; a multiple-selection
group keeps every picked value.
Fields§
§items: Vec<EuvToggleGroupItem>The entries rendered in the control, in display order.
values: Signal<Vec<String>>The signal holding the selected values.
multiple: boolWhether more than one entry can be selected at a time.
collapsible: boolWhether a single-selection group can be emptied by picking the selected entry again.
variant: EuvToggleVariantThe visual variant of every entry.
size: EuvToggleSizeThe control size of every entry.
on_change: Option<Rc<dyn Fn(Vec<String>)>>Optional callback receiving the selected values.
Trait Implementations§
Source§impl Clone for EuvToggleGroupProps
impl Clone for EuvToggleGroupProps
Source§impl Debug for EuvToggleGroupProps
impl Debug for EuvToggleGroupProps
Auto Trait Implementations§
impl !RefUnwindSafe for EuvToggleGroupProps
impl !Send for EuvToggleGroupProps
impl !Sync for EuvToggleGroupProps
impl !UnwindSafe for EuvToggleGroupProps
impl Forget for EuvToggleGroupProps
impl Freeze for EuvToggleGroupProps
impl Move for EuvToggleGroupProps
impl Unpin for EuvToggleGroupProps
impl UnsafeUnpin for EuvToggleGroupProps
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