Input Group
Add addons, buttons, and helper content to inputs.
Installation
Command to install the Input Group component.
Component Guide
Use the following to build the Input Group component.
from components.ui.input_group import input_groupSource Code & Dependencies
For manual installation, copy each of the source codes below in their respective locations.
components/core/core.py
components/ui/button.py
components/ui/input.py
components/ui/textarea.py
components/ui/input_group.py
Align
Use align on input_group.addon to position it relative to the input.
For proper focus management,
input_group.addonshould always be placed afterinput_group.inputorinput_group.textareain the DOM. Usealignto visually position it instead of reordering the DOM.
inline-start
The default — positions the addon at the start of the input.
Props used: align="inline-start" on input_group.addon.
inline-end
Props used: align="inline-end" on input_group.addon.
block-start
Positions the addon above the input — typically used with input_group.textarea.
Props used: align="block-start" on input_group.addon.
Header positioned above the input.
Header positioned above the textarea.
block-end
Props used: align="block-end" on input_group.addon.
Footer positioned below the input.
Footer positioned below the textarea.
Examples
Icons
Props used: align on input_group.addon.
Text
Props used: none required beyond default input_group.text composition.
Button
Props used: size on input_group.button.
Spinner
Props used: align on input_group.addon.
Dropdown
Props used: see the Menu docs for menu-specific props.
API Reference
input_group.root
The main wrapper around inputs and addons.
input_group.root(
input_group.addon(hi("Search01Icon")),
input_group.input(placeholder="Search..."),
)
input_group.addon
Displays icons, text, buttons, or other content alongside the input. Can contain multiple input_group.buttons.
input_group.addon(hi("Search01Icon"), align="inline-start")
Use inline-start/inline-end with input_group.input, and block-start/block-end with input_group.textarea.
input_group.button
A button pre-styled for input group contexts. See the Button docs for the rest of button's props.
input_group.addon(
input_group.button(hi("X01Icon"), aria_label="Clear"),
align="inline-end",
)
input_group.input
Drop-in replacement for input() inside an input group — pre-styled and tagged with the shared data-slot="input-group-control" used for group-wide focus states.
input_group.input(placeholder="Search...")
Any other prop accepted by input() is passed straight through.
input_group.textarea
Drop-in replacement for textarea() inside an input group — same data-slot="input-group-control" convention as input_group.input.
input_group.textarea(placeholder="Leave a comment...")
Any other prop accepted by textarea() is passed straight through.