---
title: Group
description: "`Group` is a component that groups and attaches multiple elements together."
links:
- style: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/group/group.style.ts
- source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/group
- storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-group--basic
---
```tsx
```
## Usage
```tsx
import { Group } from "@yamada-ui/react"
```
```tsx
import { Group } from "@/components/ui"
```
```tsx
import { Group } from "@workspaces/ui"
```
```tsx
```
### Change the Orientation
To change the orientation, set `orientation` to either `"vertical"` or `"horizontal"`. The default is `"horizontal"`.
```tsx
```
### Stretch Child Elements
To stretch child elements to full width, set `grow` to `true`.
```tsx
```
### Attach Child Elements
To attach child elements together, set `attached` to `true`.
```tsx
}
/>
@yamada-ui/react
10k+
```
## Props
| Prop | Default | Type | Description |
| ------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `as` | - | `As` | The HTML element to render. |
| `asChild` | - | `boolean` | Merges its props onto its immediate child. |
| `css` | - | `CSSObject \| CSSObject[]` | The CSS object. |
| `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. |
| `align` | - | `"-moz-initial" \| "baseline" \| "center" \| "end" \| "flex-end" \| "flex-start" \| "inherit" \| "initial" \| "normal" \| "revert-layer" ...` | The CSS `align-items` property. |
| `attached` | `false` | `boolean` | If `true`, the borderRadius of button that are direct children will be altered to look flushed together. |
| `basis` | - | `"-moz-fit-content" \| "-moz-initial" \| "-moz-max-content" \| "-moz-min-content" \| "-webkit-auto" \| "0.5" \| "1.5" \| "1" \| "1/12" \| "1/2" ...` | The CSS `flex-basis` property. |
| `direction` | - | `"-moz-initial" \| "column-reverse" \| "column" \| "inherit" \| "initial" \| "revert-layer" \| "revert" \| "row-reverse" \| "row" \| "unset" ...` | The CSS `flex-direction` property. |
| `grow` | `false` | `boolean` | If `true`, the children will grow to fill the available space. |
| `justify` | - | `"-moz-initial" \| "center" \| "end" \| "flex-end" \| "flex-start" \| "inherit" \| "initial" \| "left" \| "normal" \| "revert-layer" ...` | The CSS `justify-content` property. |
| `orientation` | `"horizontal"` | `"horizontal" \| "vertical"` | The orientation of the group. |
| `shrink` | - | `"-moz-initial" \| "inherit" \| "initial" \| "revert-layer" \| "revert" \| "unset" \| number & {} ...` | The CSS `flex-shrink` property. |
| `stacking` | - | `"first-on-top" \| "last-on-top"` | The stacking order of the group. |
| `wrap` | - | `"-moz-initial" \| "inherit" \| "initial" \| "nowrap" \| "revert-layer" \| "revert" \| "unset" \| "wrap-reverse" \| "wrap" ...` | The CSS `flex-wrap` property. |