Input

Form

A styled text input field with focus ring and placeholder styling.

Preview

Enter your email address.

Variants

Default
Ghost

Usage

input.rs
use floe_ui::components::input;

"text-zinc-500">// Default styled input
let field = input::styled("Email…", &self.email, &tokens)
    .on_input(Message::EmailChanged);

"text-zinc-500">// Ghost input (minimal styling)
let ghost = input::ghost("Search…", &self.search, &tokens)
    .on_input(Message::SearchChanged);

API Reference

Props / Parameters

NameTypeDescription
placeholder&strPlaceholder text
value&strCurrent text value
tokens&DesignTokensDesign tokens for theming

Style Functions

default_style(tokens)
ghost_style(tokens)

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

Builder Functions

styled(placeholder, value, tokens)
ghost(placeholder, value, tokens)

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

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