Collapsible Content
Editorial "about" sections — a media column beside intro copy and a set of collapsible accordion rows.
Preview
@props([
'eyebrow' => 'About us',
'heading' => 'Crafted to be carried for years, not seasons',
'intro' => 'Every piece begins with the material and ends with the maker. We keep the process close, the runs small, and the standards uncompromising — so what you carry only improves with age.',
'items' => null,
'allowMultiple' => false,
'cta' => ['label' => 'Read our full story', 'href' => '#'],
])
@php
$items ??= [
['title' => 'Our materials', 'body' => 'Full-grain leather is sourced from a single family-run tannery and vegetable-tanned over six weeks. No bonded offcuts, no plastic coatings — only hides that earn a richer patina with every wear.'],
['title' => 'Craftsmanship', 'body' => 'Each bag is cut, stitched and finished by one artisan from start to seal. Saddle-stitched seams and burnished edges are done by hand, the way they have been for four generations.'],
['title' => 'Care', 'body' => 'Wipe with a soft, dry cloth and condition twice a year. Store away from direct heat and let natural marks settle in — they are the record of a bag that is genuinely used.'],
];
// Per-instance id base so triggers/panels wire up uniquely on a page with multiple copies.
$blockId = 'collapsible-content-'.\Illuminate\Support\Str::random(6);
@endphp
<section
{{ $attributes->merge(['class' => 'bg-background py-16 text-foreground sm:py-20 lg:py-28']) }}
data-slot="collapsible-content"
aria-labelledby="{{ $blockId }}-heading"
>
<div class="mx-auto grid max-w-7xl items-center gap-12 px-6 sm:px-8 lg:grid-cols-2 lg:gap-16 lg:px-12">
{{-- ── Media placeholder (start column) ── --}}
<div class="aspect-[4/5] w-full overflow-hidden rounded-lg bg-muted sm:aspect-[5/4] lg:aspect-[4/5]" aria-hidden="true"></div>
{{-- ── Editorial copy + collapsible rows (end column) ── --}}
<div class="flex flex-col">
<p class="font-body text-base uppercase tracking-[0.3em] text-muted-foreground">
{{ __($eyebrow) }}
</p>
<h2 id="{{ $blockId }}-heading" class="mt-4 font-heading text-3xl font-normal leading-[1.1] tracking-tight sm:text-4xl lg:text-5xl">
{{ __($heading) }}
</h2>
<p class="mt-6 max-w-prose font-body text-base leading-relaxed text-muted-foreground sm:text-lg">
{{ __($intro) }}
</p>
{{-- Collapsible rows on the ghost accordion; the first row starts open. --}}
<x-ui.accordion variant="ghost" :inset="false" :multiple="$allowMultiple" :default="$blockId.'-0'" class="mt-10">
@foreach ($items as $i => $item)
<x-ui.accordion.item :value="$blockId.'-'.$i" class="py-2">
<x-ui.accordion.trigger class="!py-6 font-heading !text-lg !font-normal hover:text-primary [&_svg]:size-5">
{{ __($item['title']) }}
</x-ui.accordion.trigger>
<x-ui.accordion.content class="font-body !text-base">
<p class="pb-2 leading-relaxed">{{ __($item['body']) }}</p>
</x-ui.accordion.content>
</x-ui.accordion.item>
@endforeach
</x-ui.accordion>
@if ($cta)
<div class="mt-10">
<x-ui.button :href="$cta['href']" variant="outline" :withArrow="true">
{{ __($cta['label']) }}
</x-ui.button>
</div>
@endif
</div>
</div>
</section>
Installation
php artisan ui:add blocks/collapsible-content-about
Registry contract
Install confidence
php artisan ui:add blocks/collapsible-content-about
writes only the generated targets below. The CLI validates each file hash before writing and
prompts before replacing local changes unless --force is used.
- Version
- 1.0.5
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/collapsible-content-about.blade.php |
Registry dependencies
Package dependencies
composer: jml/brok:^0.2
npm: alpinejs
Use with AI
A brief for your coding agent: what the block is, the install command, how to render it, its props and the rules. Copy it, or open a prompt about this block in an assistant.
# Brok UI block: Collapsible Content (`collapsible-content-about`)
An editorial two-column 'about' section pairing a full-bleed media placeholder with an eyebrow, display heading, intro copy and a set of inline collapsible accordion rows for materials, craftsmanship and care detail.
Brok UI is a Laravel Blade registry. `ui:add` copies this block into the app as plain Blade the app owns; it composes installed `<brok:*>` primitives and semantic design tokens.
## Install
```bash
php artisan ui:add blocks/collapsible-content-about
```
## Render it
```blade
<x-blocks.collapsible-content-about />
```
## Props
- `eyebrow` (string, default `About us`)
- `heading` (string, default `Crafted to be carried for years, not seasons`)
- `intro` (string, default `Every piece begins with the material and ends with the maker. We keep the process close, the runs small, and the standards uncompromising — so what you carry only improves with age.`)
- `items` (mixed|null, default `null`)
- `allow-multiple` (bool, default `false`)
- `cta` (array, default `['label' => 'Read our full story', 'href' => '#']`)
## Use when
- Pairing an editorial two-column about section with inline collapsible rows (materials, craftsmanship, care) instead of static paragraphs.
- Letting a visitor expand only the topic they care about rather than reading every paragraph.
## Avoid when
- Use about-split for a fully static about section without expandable rows.
## Rules
- Render the installed block with `<x-blocks.collapsible-content-about />` and pass data through its props; edit the copied file only for structural changes.
- Keep the semantic design tokens (`bg-background`, `text-muted-foreground`); never swap in raw colour utilities.
- Keep the `data-slot` attributes and the logical (start/end) spacing so the markup still mirrors under `dir="rtl"`.
## Links
- Docs: https://brokui.dev/blocks/collapsible-content-about
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/collapsible-content-about.json
Working in Claude Code, Cursor or Codex? Give the agent the whole registry through the MCP server or the Brok UI skill.
Guidance
Use when
- Pairing an editorial two-column about section with inline collapsible rows (materials, craftsmanship, care) instead of static paragraphs.
- Letting a visitor expand only the topic they care about rather than reading every paragraph.
Avoid when
- Use about-split for a fully static about section without expandable rows.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
- Anatomy
Usage
Render the block as a component, passing data where useful:
<x-blocks.collapsible-content-about />
Built from primitives
This block composes installed <brok:*> primitives and semantic design
tokens only — it does not reimplement any primitive. Re-theme it (light, dark, admin, customer) by
editing CSS variables; flip the preview to RTL to confirm it mirrors.
Source
The exact, editable file ui:add writes
into your app. The preview above renders this same source — there are no preview-only blocks.
@props([
'eyebrow' => 'About us',
'heading' => 'Crafted to be carried for years, not seasons',
'intro' => 'Every piece begins with the material and ends with the maker. We keep the process close, the runs small, and the standards uncompromising — so what you carry only improves with age.',
'items' => null,
'allowMultiple' => false,
'cta' => ['label' => 'Read our full story', 'href' => '#'],
])
@php
$items ??= [
['title' => 'Our materials', 'body' => 'Full-grain leather is sourced from a single family-run tannery and vegetable-tanned over six weeks. No bonded offcuts, no plastic coatings — only hides that earn a richer patina with every wear.'],
['title' => 'Craftsmanship', 'body' => 'Each bag is cut, stitched and finished by one artisan from start to seal. Saddle-stitched seams and burnished edges are done by hand, the way they have been for four generations.'],
['title' => 'Care', 'body' => 'Wipe with a soft, dry cloth and condition twice a year. Store away from direct heat and let natural marks settle in — they are the record of a bag that is genuinely used.'],
];
// Per-instance id base so triggers/panels wire up uniquely on a page with multiple copies.
$blockId = 'collapsible-content-'.\Illuminate\Support\Str::random(6);
@endphp
<section
{{ $attributes->merge(['class' => 'bg-background py-16 text-foreground sm:py-20 lg:py-28']) }}
data-slot="collapsible-content"
aria-labelledby="{{ $blockId }}-heading"
>
<div class="mx-auto grid max-w-7xl items-center gap-12 px-6 sm:px-8 lg:grid-cols-2 lg:gap-16 lg:px-12">
{{-- ── Media placeholder (start column) ── --}}
<div class="aspect-[4/5] w-full overflow-hidden rounded-lg bg-muted sm:aspect-[5/4] lg:aspect-[4/5]" aria-hidden="true"></div>
{{-- ── Editorial copy + collapsible rows (end column) ── --}}
<div class="flex flex-col">
<p class="font-body text-base uppercase tracking-[0.3em] text-muted-foreground">
{{ __($eyebrow) }}
</p>
<h2 id="{{ $blockId }}-heading" class="mt-4 font-heading text-3xl font-normal leading-[1.1] tracking-tight sm:text-4xl lg:text-5xl">
{{ __($heading) }}
</h2>
<p class="mt-6 max-w-prose font-body text-base leading-relaxed text-muted-foreground sm:text-lg">
{{ __($intro) }}
</p>
{{-- Collapsible rows on the ghost accordion; the first row starts open. --}}
<x-ui.accordion variant="ghost" :inset="false" :multiple="$allowMultiple" :default="$blockId.'-0'" class="mt-10">
@foreach ($items as $i => $item)
<x-ui.accordion.item :value="$blockId.'-'.$i" class="py-2">
<x-ui.accordion.trigger class="!py-6 font-heading !text-lg !font-normal hover:text-primary [&_svg]:size-5">
{{ __($item['title']) }}
</x-ui.accordion.trigger>
<x-ui.accordion.content class="font-body !text-base">
<p class="pb-2 leading-relaxed">{{ __($item['body']) }}</p>
</x-ui.accordion.content>
</x-ui.accordion.item>
@endforeach
</x-ui.accordion>
@if ($cta)
<div class="mt-10">
<x-ui.button :href="$cta['href']" variant="outline" :withArrow="true">
{{ __($cta['label']) }}
</x-ui.button>
</div>
@endif
</div>
</div>
</section>
Ownership & lifecycle
Owner, release state, review evidence and adoption for this item.
- Owner
- Platform UI (@JoshJML)
- Current version
-
1.0.5 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0