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 Label

Inputs & forms
1 of 3
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.

3 versions·3 libraries

  • 8bitcn
  • HextaUI
  • shadcn/ui

8-bit Label

A simple 8-bit label component

npx shadcn@latest add https://www.8bitcn.com/r/label.json
Open in v0 Docs Repo
Library
8bitcn
License
MIT
Stack
React · Tailwind CSS · radix
Packages
cnradix-ui
Also adds
label
Size
58 lines

Code

components/ui/8bit/label.tsx

"use client";

import type * as React from "react";

import type * as LabelPrimitive from "@radix-ui/react-label";
import { type VariantProps, cva } from "class-variance-authority";

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

import { Label as ShadcnLabel } from "@/components/ui/label";

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

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

interface BitLabelProps
  extends React.ComponentProps<typeof LabelPrimitive.Root>,
    VariantProps<typeof inputVariants> {
  asChild?: boolean;
}

function Label({ className, font, ...props }: BitLabelProps) {
  return (
    <ShadcnLabel
      className={cn(className, font !== "normal" && "retro")}
      {...props}
    />
  );
}

export { Label };

More like this

8-bit Breadcrumb

8bitcn·Navigation

8-bit Toggle

8bitcn·Buttons

8-bit Collapsible

8bitcn·Data display

8-bit Skeleton

8bitcn·Feedback & loaders

8-bit Table

8bitcn·Navigation

8-bit Menu Bar

8bitcn·Overlays

8-bit Profile Card

8bitcn·Cards

8-bit Card

8bitcn·Cards

8-bit Button

8bitcn·Buttons

8-bit Carousel

8bitcn·Media & 3D

Text Type

React Bits·Text effectsMIT+

Tilt

Motion Primitives·Cards

8-bit Input-OTP

8bitcn·Inputs & forms

8-bit Scroll Area

8bitcn·Data display

Split Text

React Bits·Text effectsMIT+