Input
basecn/inputFreeComponent
Displays a form input field or a component that looks like an input field.
Live preview
live · rendered by the registry
Rendered by basecn on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://basecn.dev/r/input.jsonSource
1import { Input as InputPrimitive } from "@base-ui/react/input";2import * as React from "react";34import { cn } from "@/lib/utils";56function Input({7 className,8 type,9 ...props10}: InputPrimitive.Props & React.RefAttributes<HTMLInputElement>) {11 return (12 <InputPrimitive13 type={type}14 data-slot="input"15 className={cn(16 "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",17 "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",18 "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",19 className20 )}21 {...props}22 />23 );24}2526export { Input };
What it pulls in
npm packages
Files it writes
More from basecn
All 56 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | basecn | Components | Free | 2 deps | |
| Alertalert | basecn | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | basecn | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | basecn | Components | Free | no deps | |
| Autocompleteautocomplete | basecn | Components | Free | 2 deps | |
| Avataravatar | basecn | Components | Free | 1 dep | |
| Badgebadge | basecn | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | basecn | Components | Free | 2 deps |
