# Toggle: Disabled

> A disabled toggle keeps showing whether it's on, but can't be pressed or focused.

Example: https://hextaui.com/docs/toggle/examples/disabled
Component docs: https://hextaui.com/docs/toggle.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/toggle-disabled.json
```

This adds `components/examples/toggle/disabled.tsx` with the Toggle component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/toggle/disabled.tsx"
import { IconBold, IconUnderline } from "@tabler/icons-react"

import { Toggle } from "@/components/ui/toggle"

export function ToggleDisabled() {
  return (
    <div className="flex items-center gap-2">
      <Toggle disabled aria-label="Bold">
        <IconBold />
      </Toggle>
      <Toggle disabled defaultPressed aria-label="Underline">
        <IconUnderline />
      </Toggle>
      <Toggle disabled variant="outline">
        Read-only mode
      </Toggle>
    </div>
  )
}
```

## Props in this example

### Toggle

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "outline"` | `"default"` |  |
| `defaultPressed` | `boolean` | `false` |  |
| `disabled` | `boolean` | `false` |  |

## More Toggle examples

- [Outline](https://hextaui.com/docs/toggle/examples/outline.md)
- [With text](https://hextaui.com/docs/toggle/examples/text.md)
- [Filled when on](https://hextaui.com/docs/toggle/examples/filled-icon.md)
- [Sizes](https://hextaui.com/docs/toggle/examples/sizes.md)
- [Pill](https://hextaui.com/docs/toggle/examples/pill.md)
- [Controlled](https://hextaui.com/docs/toggle/examples/controlled.md)
- [Right to left](https://hextaui.com/docs/toggle/examples/rtl.md)
