Icons, text and actions inside the same ring as the input, so the group focuses and validates as one.
FreeWeb and MobileMotion
Preview
npx shadcn add @fetaui/input-groupPlayground
Inline start
https://
Inline end
$USD
Block start
index.tsx
Block end, composer
280 left
Invalid and disabled
Icon
Text
$USD
Suffix
@company.com
Button
Kbd
⌘ K
Dropdown
Spinner
Saving
Code
script.js
Line 1, Column 27
Autoresize
Icons animation
Invalid
Disabled
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/input-group
Inline start
Inside the pill, before the value: an icon or mono text.
https://
Invalid
Disabled
Motion
Accessibility
- One input with decorations, not a fieldset.
- Icon Buttons inside have their own labels.
Motion
- The whole group lifts on focus. Addons stay put.
- The composer grows 22 px a line in 160 ms, up to six lines, then scrolls.
- With reduced motion, height jumps.
Responsive behavior
- 40 px inline on Web and 48 px on Mobile.
Performance
- No Motion. Focus and invalid are CSS on the shared ring.
- The composer measures its height in useLayoutEffect, so it never paints at the wrong height. It measures on every render, so keep its parent quiet.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import
InputGroup,InputGroupInput,InputGroupTextarea,InputGroupTextandInputGroupChipfrom@/components/fetaui/input-group. - Use
InputGroupInput, notInput, as the child.Inputdraws its own pill. startandendsit in the pill.blockStartandblockEndadd rows and turn it into a box.- A click on the group focuses the entry unless it lands on a button or link.
invalidanddisabledgo on the group and reach its input. The demo composer's Post and the copy buttons are not wired up.
Related
InputComponentThe single line text control: a pill on the tray fill that lifts onto the surface when focused.FieldComponentLabel, control and help text as one unit, so they read, validate and announce together.TextareaComponentMulti line text with a mono character count.Icon ButtonComponentThe round sibling of Button, for an action one icon can explain.SelectComponentChoose one value from a list. The list grows out of the trigger and the highlight glides.