UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

shadcn/ui/Input

Inputs & forms
1 of 11
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

11 versions·5 librariesCompare all inputs →

  • Input
  • 8-bit Input
  • 8-bit Input-OTP
  • Input
  • Input group
  • Input OTP
  • Kokonut UI
  • Input Group
  • Input Otp
  • Ai Input
  • Ai Prompt Input

Input

npx shadcn@latest add https://ui.shadcn.com/r/styles/new-york-v4/input.json
Open in v0 Docs Repo
Library
shadcn/ui
License
MIT
Stack
React · Tailwind CSS
Packages
cn
Size
21 lines
Demo
From shadcn/ui

Code

registry/new-york-v4/ui/input.tsx

import * as React from "react"
import { cn } from "cn"

function Input({ className, type, ...props }: React.ComponentProps<"input">) {
  return (
    <input
      type={type}
      data-slot="input"
      className={cn(
        "h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
        "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
        "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
        className
      )}
      {...props}
    />
  )
}

export { Input }

More like this

Ai Prompt Input

SmoothUI·Inputs & forms

Alert

SmoothUI·Feedback & loaders

Textarea

shadcn/ui·Text effects

Marking Menu

Kokonut UI·Overlays

Accordion

SmoothUI·Data display

Dot Pattern

Magic UI·Backgrounds

Command

shadcn/ui·Overlays

Grid

Eldora UI·Other

Skeleton

shadcn/ui·Feedback & loaders

Terminal

Eldora UI·Media & 3D

Sidebar

shadcn/ui·Navigation

Progress

shadcn/ui·Feedback & loaders

Ai Message

SmoothUI·Backgrounds

Ai Reasoning

SmoothUI·Media & 3D

Android

Magic UI·Media & 3D