Checkbox

Form

A 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

NameTypeDescription
label&strLabel text for the checkbox
is_checkedboolCurrent checked state
tokens&DesignTokensDesign 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