pub struct EuvButtonProps {
pub variant: EuvButtonVariant,
pub size: EuvButtonSize,
pub label: &'static str,
pub data_slot: Option<&'static str>,
pub onclick: Option<Rc<dyn Fn(Event)>>,
pub disabled: Signal<bool>,
pub submit: bool,
pub aria_label: Option<String>,
pub busy: Signal<bool>,
pub data_testid: &'static str,
}Expand description
Props for the euv_button component.
Defines the strongly-typed interface for a versatile button.
Fields§
§variant: EuvButtonVariantThe visual variant determining colour scheme.
size: EuvButtonSizeThe size of the control.
label: &'static strThe button label text, used as fallback when no children are provided.
data_slot: Option<&'static str>An optional semantic slot name, defaulting to button.
onclick: Option<Rc<dyn Fn(Event)>>Optional click event handler.
disabled: Signal<bool>Whether the button is disabled.
submit: boolWhether the button submits the form it stands in.
A button inside a form submits it by default, which is almost never what a control that only performs an action wants. The button is therefore inert unless the caller asks for the submission.
aria_label: Option<String>The accessible name of the button.
The name is the label the button shows unless the caller names one of its own, which a button that carries a glyph rather than a word needs.
busy: Signal<bool>Whether the button is busy.
A busy button is one whose work has not finished yet. The state is announced to the reader, so a control that is working says so.
data_testid: &'static strA stable identifier for application integration tests.