8-bit Input
8bitcn/inputFreeComponent
A simple 8-bit input component
Install it
npx shadcn@latest add https://www.8bitcn.com/r/input.jsonSource
1import { type VariantProps, cva } from "class-variance-authority";23import { cn } from "@/lib/utils";45import { Input as ShadcnInput } from "@/components/ui/input";67import "@/components/ui/8bit/styles/retro.css";89export const inputVariants = cva("", {10 variants: {11 font: {12 normal: "",13 retro: "retro",14 },15 },16 defaultVariants: {17 font: "retro",18 },19});2021export interface BitInputProps22 extends React.InputHTMLAttributes<HTMLInputElement>,23 VariantProps<typeof inputVariants> {24 asChild?: boolean;25}2627function Input({ ...props }: BitInputProps) {28 const { className, font } = props;2930 return (31 <div32 className={cn(33 "relative border-y-6 border-foreground dark:border-ring !p-0 flex items-center",34 className35 )}36 >37 <ShadcnInput38 {...props}39 className={cn(40 "rounded-none ring-0 !w-full",41 font !== "normal" && "retro",42 className43 )}44 />4546 <div47 className="absolute inset-0 border-x-6 -mx-1.5 border-foreground dark:border-ring pointer-events-none"48 aria-hidden="true"49 />50 </div>51 );52}5354export { Input };
What it pulls in
Other registry items
Files it writes
More from 8bitcn
All 121 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 8-bit Accordionaccordion | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Alertalert | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Alert Dialogalert-dialog | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Avataravatar | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Badgebadge | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Breadcrumbbreadcrumb | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Buttonbutton | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Button Groupbutton-group | 8bitcn | Components | Free | no deps · 4 files |
