bearnie

Toggle

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

Installation

npx bearnie add toggle
npx bearnie add toggle

Usage

import { Toggle } from "@/components/bearnie/toggle"
<Toggle>Toggle</Toggle>

Examples

Outline

With text

Sizes

Pressed

Disabled

Anatomy

  • Toggle - A pressable button that toggles between on and off states

Props

Toggle

Prop Type Default Description
variant “default” | “outline” “default” Visual style variant
size “sm” | “default” | “lg” “default” Size of the toggle
pressed boolean false Initial pressed state
disabled boolean false Disables the toggle
class string - Additional CSS classes