Container

This is an example on how to easily create a Container component. Contents within a container doesn't span across the full width of the screen.

Put the following code in a components/container.blade.php file:

<div {{ $attributes->merge(['class' => 'mx-auto max-w-7xl px-6']) }}>
    {{ $slot }}
</div>

Usage

<x-container>
    ...content...
</x-container>

<x-container class="my-12">
    ...content...
</x-container>
Previous topic
← General
Next topic
Grids →