---
title: "Container"
description: "Контейнер для центрирования контента и ограничения его максимальной ширины."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/container"
---
# Container

> Контейнер для центрирования контента и ограничения его максимальной ширины.

## Использование

Слот по умолчанию центрирует контент и ограничивает его ширину.

> [!TIP]
> See: /docs/getting-started/theme/css-variables/#container
> Максимальная ширина задаётся CSS-переменной `--b24ui-container-width`.

```vue [ContainerExample.vue]
<template>
  <B24Container>
    <Placeholder class="h-32" />
  </B24Container>
</template>
```

## API

### Пропсы

```ts
/**
 * Props for the Container component
 */
interface ContainerProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  b24ui?: { base?: any; } | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the Container component
 */
interface ContainerSlots {
  default(): any;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    container: {
      base: 'w-full max-w-(--b24ui-container-width) mx-auto px-4 sm:px-6 lg:px-8'
    }
  }
})
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
