Expand description
Buttons allow your users to perform actions by pressing them.
§Example
use iced::widget::button;
#[derive(Clone)]
enum Message {
ButtonPressed,
}
fn view(state: &State) -> Element<'_, Message> {
button("Press me!").on_press(Message::ButtonPressed).into()
}
Structs§
Enums§
Traits§
Functions§
- danger
- A danger button; denoting a destructive action.
- primary
- A primary button; denoting a main action.
- secondary
- A secondary button; denoting a complementary action.
- success
- A success button; denoting a good outcome.
- text
- A text button; useful for links.
- warning
- A warning button; denoting a risky action.