Text Field

A single-line text field with the macOS hairline border and accent focus ring.

@cupertinoui/inputRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/input

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

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

<Input placeholder="Name" />

Examples

Form

macOS forms align the labels to the right of a shared column.

States

Placeholder, invalid (aria-invalid) and disabled.

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Input

A styled native input. Accepts every input attribute.

PropTypeDescription
aria-invalidbooleanShows the red error ring.
classNamestringExtra classes, merged with the component's own.