Skip to content
synccn

Input Group

Inputs with attached prefixes, suffixes, icons and buttons.

https://.com
⌘K
$USD

Installation

$ pnpm dlx shadcn@latest add @synccn/input-group

First time in this project? Connect synccn with one command.

Usage

import { InputGroup, InputGroupInput, InputAddon, InputGroupButton } from "@/components/ui/input-group";<InputGroup>  <InputAddon variant="muted">https://</InputAddon>  <InputGroupInput /></InputGroup>

API reference

Generated from the component's TypeScript types, so it always matches the code.

InputGroup

Field with attached addons. Put <InputAddon>, <input> (InputGroupInput) and <InputGroupButton> inside in any order.

  • className
    string

    Extra classes for the root element.

  • children
    React.ReactNode

    Content to render.

InputGroupInput

  • className
    string

    Extra classes for the root element.

Also accepts every standard <input> attribute, and forwards its ref.

InputAddon

Text or icon segment. variant "muted" draws a filled block with a divider.

  • variant
    "plain" | "muted"

    Default "plain"

    Muted draws a filled block with a divider.

  • className
    string

    Extra classes for the root element.

  • children
    React.ReactNode

    Content to render.

InputGroupButton

  • className
    string

    Extra classes for the root element.

Also accepts every standard <button> attribute, and forwards its ref.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

No ARIA roles, key handling or motion settings in its source. It renders plain elements, so its accessibility comes from the content and labels you give it.