Search
Search for a page

Input Group

A layout wrapper designed to encapsulate inputs, icons, and buttons under a unified glass capsule.

bunx shadcn-svelte@latest add https://ui.grgurevic.click/r/input-group.json

Usage

An input group featuring a leading search icon and a trailing action button.

Best practices

The best practices when using input groups.

  • Place primary search action logoButton components inside the trailing addon slot for consistent alignment.
  • Limit the number of icons or action buttons inside a single input group to avoid clutter.
  • Ensure the placeholder text explains the scope of the search or action clearly.
  • Keep the container aligned nicely on responsive screen width changes.

Components & Props

Input Group sub-components and customization parameters.

Component / PropType / RoleDefaultDescription
InputGroup.RootCapsule container-Orchestrates border reflections, scale responses, and mouse interactions.
InputGroup.InputText input-The inner input field which blends borderless inside the capsule outline.
InputGroup.AddonAddon section-Section for leading/trailing elements. Takes `align="inline-start" | "inline-end"`.
InputGroup.ButtonInternal action button-Tailing action button specifically sized to fit inside the capsule boundary.
specularbooleantrueEnables 3D border reflection glare overlays on hover.
magneticbooleantrueAttracts the capsule center towards the cursor upon pointer hover.
scalebooleantrueCompresses capsule boundaries elastically when pressed.
Previous Input
Give feedback
Next List