Faber UI
Components

Input

A text input field with focus, invalid, and disabled states.

Input wraps the Base UI Input primitive with the Faber UI styling tokens. It supports all native input attributes including type, placeholder, disabled, and aria-invalid.

Installation

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

Usage

typescript
import { Input } from "@/components/ui/input";

export default function Example() {
  return <Input type="email" placeholder="you@example.com" />;
}

Examples

Default

States

With a label

Combine Input with Label and Field for accessible form rows:

typescript
import { Field } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

export default function Example() {
  return (
    <Field>
      <Label htmlFor="name">Name</Label>
      <Input id="name" placeholder="Ada Lovelace" />
    </Field>
  );
}

API

The Input accepts all props of a native <input> element, plus a className prop merged with tailwind-merge.

Changelog

  1. v0.3.0Input, Textarea, NativeSelect, CommandInput and ComboboxChipsInput use 16px text on small screens so iOS Safari no longer zooms the page on focus.patch
Full Input history

Last updated on

On this page