Container
Basic Usage
Content inside default container (max-w-5xl)
<neura::container>
<!-- Your content here -->
</neura::container>
Sizes
Small (max-w-2xl)
Small container - Perfect for forms and narrow content
Medium (max-w-4xl)
Medium container - Great for articles and documentation
Large (max-w-6xl)
Large container - Ideal for dashboards and wide layouts
Extra Large (max-w-7xl)
Extra large container - For maximum width content
Full Width (max-w-full)
Full width container - No maximum width constraint
<neura::container size="sm">...</neura::container>
<neura::container size="md">...</neura::container>
<neura::container size="lg">...</neura::container>
<neura::container size="xl">...</neura::container>
<neura::container size="full">...</neura::container>
Centered vs Not Centered
This container is centered with mx-auto
This container is not centered, aligned to the left
<neura::container :centered="true">
Centered container
</neura::container>
<neura::container :centered="false">
Not centered container
</neura::container>
Use Cases
Page Layout
Page Title
Form Container
Login Form
Dashboard Layout
Responsive Padding
Applied padding: px-4 on mobile, px-6 on tablet, px-8 on desktop
The container automatically applies:
- px-4 on mobile
- px-6 on tablet (sm:px-6)
- px-8 on desktop (lg:px-8)
Nested Containers
Outer Container (xl)
Inner Container (md) - Nested inside outer container
<neura::container size="xl">
<div>Outer content</div>
<neura::container size="md">
<div>Inner nested container</div>
</neura::container>
</neura::container>
Size Comparison
Best Practices
sm for forms, md for articles, lg/xl for dashboards
Use the same container size for similar sections
Use nested containers only when necessary
Verify that the container works well on all screens
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| size | string | default | Container size (sm, md, lg, xl, full, default) |
| centered | boolean | true | Whether to center the container horizontally |
Size Reference
| Size | Max Width | Use Case |
|---|---|---|
| sm | max-w-2xl | Forms, narrow content |
| md | max-w-4xl | Articles, documentation |
| default | max-w-5xl | General content |
| lg | max-w-6xl | Dashboards, wide layouts |
| xl | max-w-7xl | Maximum width content |
| full | max-w-full | No width constraint |