thaw/demo_markdown/docs/switch/mod.md
2024-06-03 10:44:51 +08:00

16 lines
576 B
Markdown

# Switch
```rust demo
let checked = RwSignal::new(false);
view! {
<Switch checked />
}
```
### Switch Props
| Name | Type | Default | Description |
| ----- | ----------------------------------- | -------------------- | ----------------------------------------- |
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the switch element. |
| value | `Model<bool>` | `false` | Switch's value. |