This component no longer exists. It was in ondo-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
toggle
ondo-ui/toggleRemovedComponent
A two-state button that can be either on or off.
Install it
npx shadcn@latest add https://ui.ondo.dou.so/r/toggle.jsonSource
1"use client"23import { Toggle as TogglePrimitive } from "@base-ui/react/toggle"4import { cva, type VariantProps } from "class-variance-authority"56import { cn } from "@/lib/utils"78const toggleVariants = cva(9 "group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",10 {11 variants: {12 variant: {13 default: "bg-transparent",14 outline: "border border-input bg-transparent shadow-xs hover:bg-muted",15 },16 size: {17 default:18 "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",19 xs: "h-6 min-w-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",20 sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",21 lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",22 xl: "h-11 min-w-11 rounded-lg px-3 text-base has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg:not([class*='size-'])]:size-5",23 "2xl":24 "h-13 min-w-13 rounded-xl px-4 text-lg has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-6",25 },26 },27 defaultVariants: {28 variant: "default",29 size: "default",30 },31 }32)3334function Toggle({35 className,36 variant = "default",37 size = "default",38 ...props39}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {40 return (41 <TogglePrimitive42 data-slot="toggle"43 className={cn(toggleVariants({ variant, size, className }))}44 {...props}45 />46 )47}4849export { Toggle, toggleVariants }
What it pulls in
npm packages
Other registry items
