Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Desktop Window
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Frame
- Heading
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Live Waveform
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Meter Ring
- Native Select
- Navigation Menu
- NumberCount
- Pagination
- Popover
- Progress
- Progress Ring
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Timeline
- Toast
- Toggle
- Toggle Group
- Tooltip
Compositions
Utilities
import { IconBookmark } from "@tabler/icons-react"
import { Toggle } from "@/components/ui/toggle"Installation#
bunx --bun shadcn@latest add @ondo-ui/toggle
Usage#
import { Toggle } from "@/components/ui/toggle"<Toggle>Toggle</Toggle>Examples#
Outline#
Use variant="outline" for an outline style.
import { IconBold, IconItalic } from "@tabler/icons-react"
import { Toggle } from "@/components/ui/toggle"With Text#
import { IconItalic } from "@tabler/icons-react"
import { Toggle } from "@/components/ui/toggle"Size#
Use the size prop to change the size of the toggle.
import { Toggle } from "@/components/ui/toggle"
export function ToggleSize() {Disabled#
import { Toggle } from "@/components/ui/toggle"
export function ToggleDisabled() {API reference#
The component wraps Base UI Toggle and accepts all of its props.