Checkbox
FormA styled checkbox with label — wraps Iced's native checkbox widget.
Preview
Usage
checkbox.rs
use floe_ui::components::checkbox;
"text-zinc-500">// Create a styled checkbox
let cb = checkbox::styled("Accept terms", is_checked, &tokens)
.on_toggle(Message::ToggleTerms);API Reference
Props / Parameters
| Name | Type | Description |
|---|---|---|
| label | &str | Label text for the checkbox |
| is_checked | bool | Current checked state |
| tokens | &DesignTokens | Design tokens for theming |
Style Functions
default_style(tokens)
Style functions return closures compatible with Iced's .style() method.
Builder Functions
styled(label, is_checked, tokens)
Builder functions return pre-configured Iced widgets ready for use.
Source: floe-ui/src/components/checkbox.rs