Faber UI
Components

InputGroup

Composes an input with leading and trailing addons.

InputGroup composes an input with leading and trailing addons, such as icons, text, or buttons.

Installation

Terminal
pnpm dlx shadcn@latest add https://faber-ui.vercel.app/r/input-group.json

Usage

typescript
"use client";

import { Input } from "@/components/ui/input";
import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
} from "@/components/ui/input-group";

export default function Example() {
  return (
    <InputGroup>
      <InputGroupAddon>$</InputGroupAddon>
      <InputGroupInput placeholder="0.00" />
    </InputGroup>
  );
}

Examples

With text addon

$

With button addon

With both sides

https://
.com

Aligned addon

USD

API

Each part forwards every prop of what it is built on, including className and render where Base UI supports it. The props column lists only what Faber UI adds on top.

PartBuilt onProps
InputGroupdata-slot="input-group"<div>HTML—
InputGroupAddondata-slot="input-group-addon"<div>HTML
  • align? = "inline-start""inline-start" | "inline-end" | "block-start" | "block-end"
InputGroupButtonButtonFaber UI
  • size? = "xs""xs" | "sm" | "icon-xs" | "icon-sm"
  • type? = "button""button" | "submit" | "reset"
InputGroupText<span>HTML—
InputGroupInputdata-slot="input-group-control"InputFaber UI—
InputGroupTextareadata-slot="input-group-control"TextareaFaber UI—

Last updated on

On this page