--- title: "gallery-08" description: "Image gallery with a centred heading and description, one large image on the start side and a 2x2 grid of squares beside it." category: "Gallery" --- # gallery-08 Image gallery with a centred heading and description, one large image on the start side and a 2x2 grid of squares beside it. ## Installation ```bash php artisan ui:add-block gallery-08 ``` ## Dependencies - composer: `gehrisandro/tailwind-merge-laravel` ## Source `resources/views/components/ui/blocks/gallery-08.blade.php` ```blade {{-- Every piece of content is a prop. An image is ['src' => ..., 'alt' => ...]; leave src empty to show a placeholder. The first image is the large one: it spans two rows (and two columns from md up) and takes its size from the grid. --}} @props([ 'heading' => 'Image Gallery', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'images' => [ ['src' => null, 'alt' => 'Placeholder image 1'], ['src' => null, 'alt' => 'Placeholder image 2'], ['src' => null, 'alt' => 'Placeholder image 3'], ['src' => null, 'alt' => 'Placeholder image 4'], ['src' => null, 'alt' => 'Placeholder image 5'], ], ])
merge(['class' => 'w-full bg-background px-[5%] py-16 text-foreground md:py-24 lg:py-28']) }}>

{{ $heading }}

{{ $description }}

@foreach ($images as $image)
@if (!empty($image['src'])) {{ $image['alt'] ?? '' }} @else @endif
@endforeach
```