Skip to main content

Module label

Module label 

Source
Available on crate feature field only.
Expand description

Labels, and fields that stack a label, a control and helper text.

use iced_cube::{field, input};

#[derive(Debug, Clone)]
enum Message { Email(String) }

let email = "";
let view: iced::Element<'_, Message> = field("Email", input("you@example.com", email).on_input(Message::Email))
    .description("We never share it.")
    .required(true)
    .into();

Structs§

Field
A labelled control with optional description and error text.
Label
A label builder. Convert it into an Element to render.

Enums§

State
Tone of a label.

Functions§

colour
Label colour for a state.
description_colour
Colour of a field’s description.
error_colour
Colour of a field’s error message.
field
Stacks a label above control. Add helper text with Field::description and Field::error.
label
Creates a label naming a control.
required_colour
Colour of the required marker.