Input

Text input field for forms. Install Input from the VLLNT UI registry with the shadcn CLI.

Report a bug

Text input field for forms. Part of the core family in VLLNT UI, it ships as a machine-readable registry entry — copy the source directly into your app with the shadcn CLI and own it, no runtime dependency on a component library.

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Installation

Add Input to your project with the shadcn CLI. The source lands in your codebase, ready to adapt:

pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/input.json

Source

import * as React from "react"; import { cn } from "../../lib/utils"; const Input = ({ className, ref: reference, type, ...props }: React.ComponentProps<"input"> & { ref?: React.Ref<HTMLInputElement> }) => { return ( <input className={cn( "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className, )} ref={reference} type={type} {...props} /> ); }; Input.displayName = "Input"; export { Input };

Stories

Explore every variant and state in the interactive Storybook:

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Dependencies

  • @vllnt/ui@^0.3.0