---
title: Container
description: "`Container` is a component used as a general division element. By default, it renders the `section` element."
links:
- style: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/container/container.style.ts
- source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/container
- storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-container--basic
---
```tsx
"Dragon Ball" (DRAGON BALL)
"Dragon Ball" (DRAGON BALL) is a Japanese manga work by Akira Toriyama. It
was serialized in "Weekly Shonen Jump" (Shueisha) from the 51st issue of
1984 to the 25th issue of 1995. It is a long manga that depicts
"adventure", "dream", "battle", "friendship", etc., centered on the
protagonist, Son Goku, and the treasure, Dragon Ball, which can grant any
wish if all seven scattered balls are collected.
```
## Usage
```tsx
import { Container } from "@yamada-ui/react"
```
```tsx
import { Container } from "@/components/ui"
```
```tsx
import { Container } from "@workspaces/ui"
```
```tsx
```
### Change Variant
```tsx
{(variant, index) => (
Container
Variant is {variant}
)}
```
### Change Size
```tsx
{(size, index) => (
Container
Size is {size}
)}
```
### Change Color Scheme
```tsx
{(colorScheme, index) => (
Container
ColorScheme is {colorScheme}
)}
```
### Centering Child Elements
```tsx
"Dragon Ball" (DRAGON BALL)
"Dragon Ball" (DRAGON BALL) is a Japanese manga work by Akira Toriyama. It
was serialized in "Weekly Shonen Jump" (Shueisha) from the 51st issue of
1984 to the 25th issue of 1995. It is a long manga that depicts
"adventure", "dream", "battle", "friendship", etc., centered on the
protagonist Goku (Son Goku), and the treasure "Dragon Ball" that can grant
any wish if all seven balls scattered around the world are collected.
```
## Props
### Container.Root
| 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. |
| `size` | `"lg"` | `"lg" \| "md" \| "sm" \| "xl"` | The size of the component. |
| `variant` | `"panel"` | `"elevated" \| "outline" \| "panel" \| "solid" \| "subtle" \| "surface" ...` | The variant of the component. |
| `centerContent` | `false` | `boolean` | If `true`, container will center its children regardless of their width. |
### Container.Body
| 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. |
### Container.Footer
| 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. |
### Container.Header
| 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. |