Input Group

Add additional information or actions to an input or textarea.

12 results

Inline Start

Icon positioned at the start.

Inline End

Icon positioned at the end.

Block Start

Full Name

Header positioned above the input.

script.js

Header positioned above the textarea.

Block End

USD

Footer positioned below the input.

0/280

Footer positioned below the textarea.

Icon

Display icons within input groups.

Text

Display additional text information alongside inputs.

$
USD
https://
.com
@company.com
120 characters left

Button

Add buttons to perform actions within the input group.

Your connection is not secure.

You should not enter any sensitive information on this site.

https://

Kbd

Display a keyboard shortcut associated with the input.

⌘K

Dropdown

Pair input groups with dropdown menus for complex interactions.

Spinner

Show loading indicators while processing input.

Saving...
Please wait...

Textarea

Input groups also work with textarea components. Use block-start or block-end for alignment.

Line 1, Column 1
script.js

Tooltip

Add Add tooltips to provide additional context or help.

Label

Add labels within input groups to improve accessibility.

Button Group

Wrap input groups with button groups to create prefixes and suffixes.

.com

Anatomy

Import all parts and piece them together.

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

#[component]
pub fn InputGroupAnatomy() -> impl IntoView {
    view! {
        <InputGroup>
            <Input />
            <InputGroupAddon>
                <InputGroupText />
            </InputGroupAddon>
        </InputGroup>
    }
}

API Reference

InputGroup

The main component that wraps inputs and addons.

Custom Attributes
NameTypeDefaultDescription
disabledboolfalse

Toggle whether or not this input group should appear disabled.

Implements global attributes.

InputGroupAddon

Displays icons, text, buttons, or other content alongside inputs.

Custom Attributes
NameTypeDefaultDescription
alignString"inline-start"

Set how child content should be aligned. Accepted values are inline-start | inline-end | block-start | block-end.

Implements global attributes.

InputGroupText

A styled wrapper for displaying text and icons in an InputGroup.

Implements global attributes.