Toggle

A two-state button that can be either on or off. Built on Base UI's toggle primitive.

Last updated January 1, 1980

CreditsUnchangedPublished

Copied from shadcn/ui.

Overview

Installation

Usage

import { Toggle } from "@/components/ui/toggle"
 
export function Example() {
  return <Toggle aria-label="Toggle bold">B</Toggle>
}

Examples

Outline

RTL

API Reference

Toggle

All other props are inherited from Base UI Toggle .