Input
octane/inputFreeComponent
octane publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/input.jsonSource
1// Base UI base input — runs on the @octanejs/base-ui `Input` primitive, which is a native2// `<input>` wired into Field (it is literally `Field.Control`).3//4// No `composeRenderProps` here, unlike the React Aria base: RAC routes `className` through a5// render-prop pipeline that must be composed, whereas Base UI's `className` is a plain string or6// a `(state) => string`, so `cn` applies directly.7//8// UNVERIFIED PROVENANCE: the class string is taken from this package's React Aria base rather9// than transcribed from upstream's Base UI source. Nothing in it keys off a primitive-emitted10// attribute, so it is a lower-risk case than `separator` — but verify before treating as ported.11//12// OCTANE DIVERGENCE: per-keystroke handling is the native `onInput` event; native `change`13// keeps its commit-on-blur meaning.14import { Input as InputPrimitive } from '@octanejs/base-ui/input';1516import { cn } from '@/lib/utils';1718export function Input({ className, type, ...props }: Record<string, any>) @{19 <InputPrimitive20 type={type}21 data-slot="input"22 className={cn(23 'h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',24 className,25 )}26 {...props}27 />28}
What it pulls in
npm packages
Other registry items
Files it writes
More from octane
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | octane | Components | Free | 2 deps | |
| Alertalert | octane | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | octane | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | octane | Components | Free | no deps | |
| Avataravatar | octane | Components | Free | 1 dep | |
| Badgebadge | octane | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | octane | Components | Free | 1 dep | |
| Buttonbutton | octane | Components | Free | 2 deps |
