# Container

> Constrain custom Markdown or HTML content to a predictable width.

Canonical HTML: https://press.varavel.com/docs/shortcodes/container/
Markdown: https://press.varavel.com/docs/shortcodes/container/index.md

`container` is a block shortcode for custom content. Standard landing sections already expose their own `container` parameter, so you usually do not wrap section shortcodes with this.

## When to Use

Use `container` for arbitrary Markdown, custom HTML, or one-off content that should align with the same width scale as landing sections.

## Usage

```markdown
{%/* container(max_width="sm") */%}

Custom content goes here.

{%/* end */%}
```

## Live Example

{% container(max_width="sm") %}

<div class="not-prose rounded-lg border border-base-400 bg-base-200 p-4 text-sm text-content-muted">
  This custom block is constrained with the container shortcode.
</div>

{% end %}

## Parameters

| Parameter   | Description                                                     |
| ----------- | --------------------------------------------------------------- |
| `max_width` | Maximum content width: `xs`, `sm`, `md`, `lg`, `xl`, or `full`. |
| `padded`    | Set to `true` to add horizontal `px-4` padding.                 |
| `align`     | Horizontal alignment: `left`, `center`, or `right`.             |
| `class`     | Additional CSS classes on the container.                        |
