Skip to content
Brok UI

Loading…

No results

Description List

Open source

Detail panels — key/value information rendered as a semantic description list with a status badge and attachments.

Preview

resources/views/blocks/description-list-detail.blade.php Blade
@props([
    'heading'     => 'Applicant information',
    'subheading'  => 'Personal details and application status.',
    'rows'        => null,
    'attachments' => null,
])

@php
    $rows ??= [
        ['label' => 'Full name', 'value' => 'Jordan Riley', 'type' => 'text'],
        ['label' => 'Email address', 'value' => 'jordan.riley@example.com', 'type' => 'text'],
        ['label' => 'Phone', 'value' => '+1 (555) 012-3456', 'type' => 'text'],
        ['label' => 'Application date', 'value' => 'June 3, 2026', 'type' => 'text'],
        ['label' => 'Salary expectation', 'value' => '$95,000 / year', 'type' => 'text'],
        ['label' => 'Status', 'value' => 'Under review', 'type' => 'badge', 'variant' => 'outline'],
        ['label' => 'About', 'value' => 'Jordan has five years of full-stack experience with a focus on Laravel and Vue. Passionate about developer tooling and clean API design, and currently open to senior and lead roles at product-focused companies.', 'type' => 'paragraph'],
    ];

    $attachments ??= [
        ['name' => 'resume-jordan-riley.pdf', 'size' => '184 KB'],
        ['name' => 'cover-letter-jordan-riley.pdf', 'size' => '96 KB'],
    ];
@endphp

<x-ui.section space="md" {{ $attributes }}>
    <div class="mx-auto max-w-3xl px-4">
        <x-ui.card class="overflow-hidden">
            <div class="flex items-start justify-between gap-4 px-6 py-6">
                <div class="min-w-0 flex-1">
                    <h2 class="text-lg font-semibold leading-6">{{ __($heading) }}</h2>
                    @if ($subheading)
                        <p class="mt-2 text-sm text-muted-foreground">{{ __($subheading) }}</p>
                    @endif
                </div>
                <x-ui.button variant="ghost" size="sm" class="shrink-0">
                    <x-slot:icon>
                        <svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                            <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" />
                        </svg>
                    </x-slot:icon>
                    {{ __('Edit') }}
                </x-ui.button>
            </div>

            <x-ui.fact-list
                layout="grid"
                size="lg"
                :facts="[...$rows, ['label' => __('Attachments'), 'type' => 'attachment', 'value' => $attachments]]"
                class="border-t border-border px-6"
            />
        </x-ui.card>
    </div>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/description-list-detail

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/description-list-detail 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.1.1
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/description-list-detail.blade.php

Registry dependencies

badge button card section fact-list

Package dependencies

composer: jml/brok:^0.2

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.

description-list-detail.md
# Brok UI block: Description List (`description-list-detail`)

A detail card presenting key and value information as a semantic description list, with a status badge row and an attachments list, plus an edit action.

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/description-list-detail
```

## Render it

```blade
<x-blocks.description-list-detail />
```

## Props

- `heading` (string, default `Applicant information`)
- `subheading` (string, default `Personal details and application status.`)
- `rows` (mixed|null, default `null`)
- `attachments` (mixed|null, default `null`)

## Use when

- Presenting key/value applicant or record details as a semantic description list with a status badge row and attachments.
- Pairing the detail rows with an edit action for the record.

## Avoid when

- Use description-list-inline for a card-less inline version, or description-list-sections to split details into grouped section cards.

## Rules

- Render the installed block with `<x-blocks.description-list-detail />` 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/description-list-detail
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/description-list-detail.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

  • Presenting key/value applicant or record details as a semantic description list with a status badge row and attachments.
  • Pairing the detail rows with an edit action for the record.

Avoid when

  • Use description-list-inline for a card-less inline version, or description-list-sections to split details into grouped section cards.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.

Usage

Render the block as a component, passing data where useful:

resources/views/welcome.blade.php Blade
<x-blocks.description-list-detail />

Built from primitives

Composes <brok:*> Semantic tokens Re-themeable RTL-ready

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.

resources/views/blocks/description-list-detail.blade.php Blade
@props([
    'heading'     => 'Applicant information',
    'subheading'  => 'Personal details and application status.',
    'rows'        => null,
    'attachments' => null,
])

@php
    $rows ??= [
        ['label' => 'Full name', 'value' => 'Jordan Riley', 'type' => 'text'],
        ['label' => 'Email address', 'value' => 'jordan.riley@example.com', 'type' => 'text'],
        ['label' => 'Phone', 'value' => '+1 (555) 012-3456', 'type' => 'text'],
        ['label' => 'Application date', 'value' => 'June 3, 2026', 'type' => 'text'],
        ['label' => 'Salary expectation', 'value' => '$95,000 / year', 'type' => 'text'],
        ['label' => 'Status', 'value' => 'Under review', 'type' => 'badge', 'variant' => 'outline'],
        ['label' => 'About', 'value' => 'Jordan has five years of full-stack experience with a focus on Laravel and Vue. Passionate about developer tooling and clean API design, and currently open to senior and lead roles at product-focused companies.', 'type' => 'paragraph'],
    ];

    $attachments ??= [
        ['name' => 'resume-jordan-riley.pdf', 'size' => '184 KB'],
        ['name' => 'cover-letter-jordan-riley.pdf', 'size' => '96 KB'],
    ];
@endphp

<x-ui.section space="md" {{ $attributes }}>
    <div class="mx-auto max-w-3xl px-4">
        <x-ui.card class="overflow-hidden">
            <div class="flex items-start justify-between gap-4 px-6 py-6">
                <div class="min-w-0 flex-1">
                    <h2 class="text-lg font-semibold leading-6">{{ __($heading) }}</h2>
                    @if ($subheading)
                        <p class="mt-2 text-sm text-muted-foreground">{{ __($subheading) }}</p>
                    @endif
                </div>
                <x-ui.button variant="ghost" size="sm" class="shrink-0">
                    <x-slot:icon>
                        <svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                            <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" />
                        </svg>
                    </x-slot:icon>
                    {{ __('Edit') }}
                </x-ui.button>
            </div>

            <x-ui.fact-list
                layout="grid"
                size="lg"
                :facts="[...$rows, ['label' => __('Attachments'), 'type' => 'attachment', 'value' => $attachments]]"
                class="border-t border-border px-6"
            />
        </x-ui.card>
    </div>
</x-ui.section>

Ownership & lifecycle

Owner, release state, review evidence and adoption for this item.
Owner
Platform UI (@JoshJML)
Current version
1.1.1
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0