Radio

Form

A styled radio button — circular with a primary dot when selected.

Preview

Usage

radio.rs
use floe_ui::components::radio;

"text-zinc-500">// Create radio buttons with shared selection state
let r1 = radio::styled_with("Option A", 0, Some(selected), Message::Selected(0), &tokens);
let r2 = radio::styled_with("Option B", 1, Some(selected), Message::Selected(1), &tokens);
let r3 = radio::styled_with("Option C", 2, Some(selected), Message::Selected(2), &tokens);

API Reference

Props / Parameters

NameTypeDescription
label&strRadio label text
valueV: Copy + EqValue this radio represents
selectedOption<V>Currently selected value
on_clickMessageMessage sent when clicked
tokens&DesignTokensDesign tokens for theming

Style Functions

default_style(tokens)

Style functions return closures compatible with Iced's .style() method.

Builder Functions

styled(label, value, selected, tokens)
styled_with(label, value, selected, on_click, tokens)

Builder functions return pre-configured Iced widgets ready for use.

Source: floe-ui/src/components/radio.rs