8bit

Search docs

Search for a docs page

Toggle

A two-state button that can be either on or off.

Installation

pnpm dlx shadcn@latest add https://8bit.cnlibs.com/r/toggle.json

Usage

import { BoldIcon } from "lucide-react";
import { Toggle } from "@/components/ui/toggle";
<Toggle aria-label="Toggle bold">
  <BoldIcon />
</Toggle>

Outline

A toggle with a pixel border, combining an icon and a text label.