MazContainer
MazContainer is a lightweight component to wrap content with optional header, border, elevation, and rounded corners - a simpler alternative to MazCard
Before use it, you should install the MazUi plugin in your project, follow instructions in Getting Started
TIP
MazContainer is designed to be a lighter alternative to MazCard. Use it when you need a simple container with basic styling options without the extra features like galleries, collapsible content, or actions.
Basic usage
With title
Add a header with a title using the title prop or the title slot.
With icons
Add icons to the header using left-icon and right-icon props.
Styling options
Elevation
Add shadow to make the container stand out.
Bordered
By default, the container has a border. You can disable it.
Transparent
Remove the background color with the transparent prop.
Rounded sizes
Customize the border radius with the rounded-size prop.
No padding
Remove internal padding with :padding="false".
Full width
Use the block prop to make the container take full width.
Custom header
Use the header slot to fully customize the header, or use title, icon-left, and icon-right slots for more granular control.
Combining options
Users
1,234
Revenue
$12.5k
Orders
567
Props
| Name | Description | Type | Required | Default | Possible values |
|---|---|---|---|---|---|
| title | Title of the card in header | string | No | undefined | - |
| elevation | Add elevation to the component | boolean | No | false | - |
| padding | Add padding to the content | boolean | No | true | - |
| bordered | Add border to the component | boolean | No | true | - |
| rounded-size | Size of the rounded | 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | No | undefined | 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full' |
| transparent | Remove background color | boolean | No | false | - |
| overflow-hidden | Hide overflow | boolean | No | true | - |
| left-icon | Add icon to the header on the left | IconComponent | string | No | undefined | - |
| right-icon | Add icon to the header on the right | IconComponent | string | No | undefined | - |
| icon-size | Size of the icon | MazIconProps['size'] | No | md | - |
| block | Display the container in full width | boolean | No | false | - |
Slots
| Name | Description | Bindings |
|---|---|---|
| header | Replace the header | |
| icon-left | icon left | |
| title | title | |
| icon-right | icon right | |
| default | content of the container |