# ButtonProps

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/generated/builders/trait-buttonprops/

**trait** · [`ferroui-view`](/docs/0.5.0/api/ferroui-view/) · v0.5.0

```rust
trait ButtonProps: ElementBuilder
```

The properties and routed events of `Button`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2542)

## Members

- [`click_mode`](#function-click_mode)
- [`command`](#function-command)
- [`hot_key`](#function-hot_key)
- [`command_parameter`](#function-command_parameter)
- [`is_default`](#function-is_default)
- [`is_cancel`](#function-is_cancel)
- [`flyout`](#function-flyout)
- [`on_click`](#function-on_click)

<a id="function-click_mode"></a>

### click_mode

```rust
fn click_mode<M>(self: Self, value: impl IntoProp<ferroui_controls::ClickMode, M>) -> Self
```

Sets `Button::click_mode_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2544)

<a id="function-command"></a>

### command

```rust
fn command<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::input::ICommand>>, M>) -> Self
```

Sets `Button::command_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2549)

<a id="function-hot_key"></a>

### hot_key

```rust
fn hot_key<M>(self: Self, value: impl IntoProp<Option<ferroui_base::input::KeyGesture>, M>) -> Self
```

Sets `Button::hot_key_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2554)

<a id="function-command_parameter"></a>

### command_parameter

```rust
fn command_parameter<M>(self: Self, value: impl IntoProp<Option<ferroui_base::BoxedValue>, M>) -> Self
```

Sets `Button::command_parameter_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2559)

<a id="function-is_default"></a>

### is_default

```rust
fn is_default<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `Button::is_default_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2564)

<a id="function-is_cancel"></a>

### is_cancel

```rust
fn is_cancel<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `Button::is_cancel_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2569)

<a id="function-flyout"></a>

### flyout

```rust
fn flyout<M>(self: Self, value: impl IntoProp<Option<ferroui_base::Ref<ferroui_controls::primitives::FlyoutBase>>, M>) -> Self
```

Sets `Button::flyout_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2574)

<a id="function-on_click"></a>

### on_click

```rust
fn on_click(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `Button::click_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L2579)

## Trait implementations

- [`ButtonProps`](/docs/0.5.0/api/ferroui-view/generated/builders/trait-buttonprops/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
