Input Group
Usage
Include CSS
Import Tailwind and one full A3S UI style bundle.
Or import only the base CSS, Input Group component CSS, and one style pack.
Using CDN or bundler imports? See the Installation page.
Add your input group HTML
Add class="input-group" to the root. Native controls stay semantic and become borderless children inside that shell.
<div class="input-group">The root shell. Add
role="group"and an accessible label only when the group itself needs to be named.<input>,<textarea>,<select>- The native control. Use
aria-invalid="true"for invalid state anddisabledfor disabled state. <span>,<svg>,<kbd>- Decorative or helper content. Use
aria-hidden="true"for decorative icons. <button>,<div role="group">- Interactive actions. Use
role="group"with an accessible label when multiple related actions share one side of the input. <header>,<footer>- Header or footer addon rows for vertically oriented input groups.
data-align="start|end"- Optional visual placement. Values use logical direction, so start/end automatically flip in RTL. Use
data-orientation="vertical"on the root for header/footer layouts. [data-control]- Escape hatch for custom controls that are not native
input,textarea, orselect.
Examples
Use data-align="start|end" on addon wrappers to position them inline. Use data-orientation="vertical" with header or footer for block placement.
Inline start
Icon positioned at the start.
Inline end
Icon positioned at the end.
Block start
Header positioned above the input.
Header positioned above the textarea.
Block end
Footer positioned below the input.
Footer positioned below the textarea.
Icon
Text
Button
Kbd
Dropdown
Spinner
Saving...
Textarea
Custom input
RTL
جاري الحفظ...
تذييل موضع أسفل منطقة النص.