# Toggle: Pill

> `shape="pill"` rounds the ends fully, for toggles inside rounded surfaces like a chat composer.

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

## Add this example

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

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

## Source

```tsx title="components/examples/toggle/pill.tsx"
import { IconSparkles, IconWorld } from "@tabler/icons-react"

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

export function TogglePill() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Toggle shape="pill" defaultPressed>
        <IconSparkles />
        Think
      </Toggle>
      <Toggle shape="pill" variant="outline">
        <IconWorld />
        Search
      </Toggle>
    </div>
  )
}
```

## Props in this example

### Toggle

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "outline"` | `"default"` |  |
| `shape` | `"default" \| "pill"` | `"default"` |  |
| `defaultPressed` | `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)
- [Disabled](https://hextaui.com/docs/toggle/examples/disabled.md)
- [Controlled](https://hextaui.com/docs/toggle/examples/controlled.md)
- [Right to left](https://hextaui.com/docs/toggle/examples/rtl.md)
