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.

8bitcn/8-bit 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 →

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

8-bit Input

A simple 8-bit input component

npx shadcn@latest add https://www.8bitcn.com/r/input.json
Open in v0 Docs Repo
Library
8bitcn
License
MIT
Stack
React · Tailwind CSS
Packages
cn
Also adds
input
Size
71 lines
Demo
Written by UIPin: the library doesn’t ship a usage example, so the preview uses one of ours (in the code below).

Code

components/ui/8bit/input.tsx

import { type VariantProps, cva } from "class-variance-authority";

import { cn } from "@/lib/utils";

import { Input as ShadcnInput } from "@/components/ui/input";

import "@/components/ui/8bit/styles/retro.css";

export const inputVariants = cva("", {
  variants: {
    font: {
      normal: "",
      retro: "retro",
    },
  },
  defaultVariants: {
    font: "retro",
  },
});

export interface BitInputProps
  extends React.InputHTMLAttributes<HTMLInputElement>,
    VariantProps<typeof inputVariants> {
  asChild?: boolean;
}

function Input({ ...props }: BitInputProps) {
  const { className, font } = props;

  return (
    <div
      className={cn(
        "relative border-y-6 border-foreground dark:border-ring !p-0 flex items-center",
        className
      )}
    >
      <ShadcnInput
        {...props}
        className={cn(
          "rounded-none ring-0 !w-full",
          font !== "normal" && "retro",
          className
        )}
      />

      <div
        className="absolute inset-0 border-x-6 -mx-1.5 border-foreground dark:border-ring pointer-events-none"
        aria-hidden="true"
      />
    </div>
  );
}

export { Input };

More like this

8-bit Date Picker

8bitcn·Inputs & forms

8-bit Alert Dialog

8bitcn·Inputs & forms

8-bit Context Menu

8bitcn·Text effects

8-bit Dropdown Menu

8bitcn·Overlays

8-bit Tooltip

8bitcn·Overlays

8-bit sheet

8bitcn·Overlays

Side Panel

Cult UI·Other

GitHub Stars Button

Animate UI·BackgroundsMIT+

8-bit Dialog

8bitcn·Inputs & forms

Input Otp

shadcn/ui·Inputs & forms

8-bit XP Bar

8bitcn·Feedback & loaders

8-bit Enemy Health Display

8bitcn·Feedback & loaders

Bg Animate Button

Cult UI·Buttons

Carousel

HextaUI·Media & 3D

Target Cursor

React Bits·Cursor & effectsMIT+