Module button
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§
- A generic widget that produces a message when pressed.
- The style of a button.
Enums§
- The possible status of a
Button
.
Traits§
- The theme catalog of a
Button
.
Functions§
- A danger button; denoting a destructive action.
- A primary button; denoting a main action.
- A secondary button; denoting a complementary action.
- A success button; denoting a good outcome.
- A text button; useful for links.
Type Aliases§
- A styling function for a
Button
.