Input

A single line field with clear labels and useful states.

npx shadcn@latest add @silicon-ui/input
fieldform
Loading…

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/input

Manually

  1. Install the dependencies.

    npm install motion
  2. Copy these files into your project. Shared files are skipped if you already have them.

    • components/silicon-ui/input/input.tsx
    • components/silicon-ui/input/input.module.css
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
import { Input } from "@/components/silicon-ui/input/input";

API reference

PropTypeDefault
label*string—
descriptionstring—
errorstring—

Also accepts the props of InputHTMLAttributes<HTMLInputElement>.

Dependencies

npm
motion
Registry
silicon-motion-tokens