Input

Displays a form input field.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::Input;

#[component]
pub fn InputAnatomy() -> impl IntoView {
    view! { <Input /> }
}

API Reference

Input

A form input field.

Custom Attributes
NameTypeDefaultDescription
defaultString""

Sets the default value of the element. Setting `value` sets this once at page load. Use this for subsequent updates.

input_typeString""

Renamed <input> `type` attribute to avoid name collisions.

invalidboolfalse

Toggle whether or not the input is disabled.

valueReactive<String>""

A reactive signal coupled to the input's value.

Implements global and input attributes.