# Button group: As a fieldset

> Use `render` to output a `<fieldset>` inside forms.

Example: https://hextaui.com/docs/button-group/examples/fieldset
Component docs: https://hextaui.com/docs/button-group.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/button-group-fieldset.json
```

This adds `components/examples/button-group/fieldset.tsx` with the Button group component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/button-group/fieldset.tsx"
import { Button } from "@/components/ui/button"
import { ButtonGroup } from "@/components/ui/button-group"

export function ButtonGroupFieldset() {
  return (
    <ButtonGroup render={<fieldset />} aria-label="Reply">
      <Button variant="outline">Reply</Button>
      <Button variant="outline">Reply all</Button>
      <Button variant="outline">Forward</Button>
    </ButtonGroup>
  )
}
```

## Props in this example

### ButtonGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `render` | `ReactElement \| (props, state) => ReactElement` | `<div>` |  |

## More Button group examples

- [Sizes](https://hextaui.com/docs/button-group/examples/sizes.md)
- [Split button](https://hextaui.com/docs/button-group/examples/split.md)
- [Separators](https://hextaui.com/docs/button-group/examples/player.md)
- [Feedback inside a group](https://hextaui.com/docs/button-group/examples/feedback.md)
- [Vertical](https://hextaui.com/docs/button-group/examples/vertical.md)
- [Nested groups](https://hextaui.com/docs/button-group/examples/nested.md)
- [With text and an input](https://hextaui.com/docs/button-group/examples/input.md)
- [Disabled and invalid](https://hextaui.com/docs/button-group/examples/disabled.md)
- [Full width](https://hextaui.com/docs/button-group/examples/full-width.md)
- [Right to left](https://hextaui.com/docs/button-group/examples/rtl.md)
