thaw/demo_markdown/docs/switch/mod.md

17 lines
576 B
Markdown
Raw Normal View History

# Switch
```rust demo
2024-06-03 10:44:51 +08:00
let checked = RwSignal::new(false);
view! {
2024-06-03 10:44:51 +08:00
<Switch checked />
}
```
### Switch Props
2024-02-09 22:44:22 +08:00
| Name | Type | Default | Description |
| ----- | ----------------------------------- | -------------------- | ----------------------------------------- |
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the switch element. |
| value | `Model<bool>` | `false` | Switch's value. |