input-group
Captures user input.
Import
Import just the input-group styles.
@import "@winnie-ui/css/spatial/input-group";@import "@winnie-ui/css/visual/input-group";Anatomy
Attach the appropriate data attributes in the structure below.
<div data-component="input-group"> <span data-slot="action" /> <i data-slot="icon" /> <element data-slot="input" /> <i data-slot="icon" /> <kbd data-slot="shortcut" /> <span data-slot="action" /></div>Examples
Size
Use the data-size attribute to change the size.
Radius
Use the data-radius attribute to change the radius.
Icon
Use the icon slot attribute to place an icon at the beginning or end of the input group.
Cap
Use the cap slot attribute to place content at the beginning or end of the input group. The cap acts a placeholder for any content you wish to put into it. It is up to you to style that content appropriately.
Action
Use the action slot attribute to place an action at the end of the input group.
Shortcut
Use the shortcut slot attribute with the kbd component to place a shortcut at the end of the input group. These shortcuts typically only apply to users on screens larger than 768px, so we hide them for any viewport width smaller than that.
Disabled
Use the disabled attribute to prevent user interaction.
Invalid
Input group will respect the :invalid selector when it is used in a form. Use the data-invalid attribute to manually control the invalid state of the input-group.
Reference
input-group
Groups all of the parts of the input-group together.
kbd
Single key in the shortcut slot.