pub fn Button(_: ButtonProps) -> ElementExpand description
Filled button component.
Buttons let people take action and make choices with one tap.
§Panics
This component requires access to a Theme.
§Examples
use dioxus::prelude::*;
use dioxus_material::{Button, Theme};
fn app() -> Element {
rsx!(Theme {
Button { onpress: |_| log::info!("clicked!"), "Click me!" } }
)
}§Props
For details, see the props struct definition.
onpress:EventHandler<Event<MouseData>>Handler for button press events.
children:ElementLabel child element.
background_color:Option<String>Background color of the container (optional).
border_radius:Option<String>Border radius of the container (optional).
height:Option<String>Height of the container (optional).