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 { IconBold, IconItalic, IconUnderline } from "@tabler/icons-react"
import {Installation#
bunx --bun shadcn@latest add @ondo-ui/toggle-group
Usage#
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"<ToggleGroup type="single">
<ToggleGroupItem value="a">A</ToggleGroupItem>
<ToggleGroupItem value="b">B</ToggleGroupItem>
<ToggleGroupItem value="c">C</ToggleGroupItem>
</ToggleGroup>Composition#
Use the following composition to build a ToggleGroup:
ToggleGroup
├── ToggleGroupItem
└── ToggleGroupItemExamples#
Outline#
Use variant="outline" for an outline style.
import {
ToggleGroup,
ToggleGroupItem,Size#
Use the size prop to change the size of the toggle group.
import {
ToggleGroup,
ToggleGroupItem,Spacing#
Use spacing to add spacing between toggle group items.
import {
ToggleGroup,
ToggleGroupItem,Vertical#
Use orientation="vertical" for vertical toggle groups.
import { IconBold, IconItalic, IconUnderline } from "@tabler/icons-react"
import {Disabled#
import { IconBold, IconItalic, IconUnderline } from "@tabler/icons-react"
import {Custom#
A custom toggle group example.
Use font-normal to set the font weight.
"use client"
import * as React from "react"API reference#
The component wraps Base UI Toggle Group and accepts all of its props.