Data Tables
Pre-composed business data tables — recent transactions, CRM deal pipeline and LMS course progress.
Preview
@props([
'title' => null,
'summary' => null,
'courses' => null,
])
@php
$title ??= __('My courses');
$summary ??= __('3 in progress, 2 completed');
$courses ??= [
[
'title' => 'Advanced Laravel Patterns',
'instructor' => 'Taylor Otwell',
'lessons' => [20, 20],
'progress' => 100,
'enrolled' => 'Jan 10, 2026',
'certificate' => 'Earned',
],
[
'title' => 'Tailwind CSS Mastery',
'instructor' => 'Adam Wathan',
'lessons' => [18, 24],
'progress' => 75,
'enrolled' => 'Mar 3, 2026',
'certificate' => 'In progress',
],
[
'title' => 'Full-Stack Inertia.js',
'instructor' => 'Jonathan Reinink',
'lessons' => [12, 20],
'progress' => 60,
'enrolled' => 'Apr 15, 2026',
'certificate' => 'In progress',
],
[
'title' => 'Alpine.js Deep Dive',
'instructor' => 'Caleb Porzio',
'lessons' => [5, 16],
'progress' => 31,
'enrolled' => 'May 22, 2026',
'certificate' => 'In progress',
],
[
'title' => 'Testing with Pest',
'instructor' => 'Nuno Maduro',
'lessons' => [16, 16],
'progress' => 100,
'enrolled' => 'Feb 8, 2026',
'certificate' => 'Earned',
],
[
'title' => 'Docker for PHP Developers',
'instructor' => 'Chris Fidao',
'lessons' => [0, 18],
'progress' => 0,
'enrolled' => 'Jun 17, 2026',
'certificate' => 'Locked',
],
];
$certVariant = [
'Earned' => 'success',
'In progress' => 'secondary',
'Locked' => 'outline',
];
@endphp
<x-ui.section space="xl" {{ $attributes }}>
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<x-ui.card>
{{-- Card header --}}
<div class="flex flex-wrap items-center justify-between gap-2 border-b border-border px-6 py-4">
<div>
<h2 class="text-base font-semibold">{{ $title }}</h2>
<p class="mt-0.5 text-xs text-muted-foreground">{{ $summary }}</p>
</div>
</div>
{{-- Table --}}
<div class="overflow-x-auto">
<x-ui.table>
<x-ui.table.header>
<x-ui.table.row>
<x-ui.table.head scope="col">{{ __('Course') }}</x-ui.table.head>
<x-ui.table.head scope="col">{{ __('Lessons') }}</x-ui.table.head>
<x-ui.table.head scope="col" class="min-w-40">{{ __('Progress') }}</x-ui.table.head>
<x-ui.table.head scope="col">{{ __('Enrolled') }}</x-ui.table.head>
<x-ui.table.head scope="col">{{ __('Certificate') }}</x-ui.table.head>
</x-ui.table.row>
</x-ui.table.header>
<x-ui.table.body>
@foreach ($courses as $course)
<x-ui.table.row>
{{-- Course title + instructor --}}
<x-ui.table.cell>
<div class="flex items-center gap-4">
{{-- Thumbnail placeholder --}}
<div
class="hidden size-10 shrink-0 rounded-md bg-muted sm:block"
aria-hidden="true"
></div>
<div class="min-w-0">
<p class="truncate text-sm font-medium">{{ $course['title'] }}</p>
<p class="truncate text-xs text-muted-foreground">
{{ __('by') }} {{ $course['instructor'] }}
</p>
</div>
</div>
</x-ui.table.cell>
{{-- Lessons count --}}
<x-ui.table.cell class="tabular-nums text-sm text-muted-foreground whitespace-nowrap">
{{ $course['lessons'][0] }} / {{ $course['lessons'][1] }}
</x-ui.table.cell>
{{-- Progress bar + caption --}}
<x-ui.table.cell>
<div class="flex min-w-32 items-center gap-2">
<div class="flex-1">
<x-ui.progress :value="$course['progress']" />
</div>
<span class="w-9 shrink-0 text-end text-xs tabular-nums text-muted-foreground">
{{ $course['progress'] }}%
</span>
</div>
</x-ui.table.cell>
{{-- Enrolled date --}}
<x-ui.table.cell class="text-sm text-muted-foreground whitespace-nowrap">
{{ $course['enrolled'] }}
</x-ui.table.cell>
{{-- Certificate badge --}}
<x-ui.table.cell>
<x-ui.badge :variant="$certVariant[$course['certificate']] ?? 'secondary'">
{{ __($course['certificate']) }}
</x-ui.badge>
</x-ui.table.cell>
</x-ui.table.row>
@endforeach
</x-ui.table.body>
</x-ui.table>
</div>
</x-ui.card>
</div>
</x-ui.section>
Installation
php artisan ui:add blocks/data-tables-course-progress
Registry contract
Install confidence
php artisan ui:add blocks/data-tables-course-progress
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.4
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/data-tables-course-progress.blade.php |
Registry dependencies
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.
# Brok UI block: Course Progress Table (`data-tables-course-progress`)
LMS course-progress table with thumbnail placeholder, lesson count, progress bar, enrolment date, and Earned/In progress/Locked certificate badges.
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/data-tables-course-progress
```
## Render it
```blade
<x-blocks.data-tables-course-progress />
```
## Props
- `title` (mixed|null, default `null`)
- `summary` (mixed|null, default `null`)
- `courses` (mixed|null, default `null`)
## Use when
- Listing enrolled courses in a table with a thumbnail, lesson count, progress bar and certificate status badge.
- Fitting an LMS dashboard that needs a scannable course-progress view rather than a generic data grid.
## Avoid when
- Use data-tables-deal-pipeline for a CRM deal-pipeline table instead of a course-progress table.
## Rules
- Render the installed block with `<x-blocks.data-tables-course-progress />` 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/data-tables-course-progress
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/data-tables-course-progress.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
- Listing enrolled courses in a table with a thumbnail, lesson count, progress bar and certificate status badge.
- Fitting an LMS dashboard that needs a scannable course-progress view rather than a generic data grid.
Avoid when
- Use data-tables-deal-pipeline for a CRM deal-pipeline table instead of a course-progress table.
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:
<x-blocks.data-tables-course-progress />
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([
'title' => null,
'summary' => null,
'courses' => null,
])
@php
$title ??= __('My courses');
$summary ??= __('3 in progress, 2 completed');
$courses ??= [
[
'title' => 'Advanced Laravel Patterns',
'instructor' => 'Taylor Otwell',
'lessons' => [20, 20],
'progress' => 100,
'enrolled' => 'Jan 10, 2026',
'certificate' => 'Earned',
],
[
'title' => 'Tailwind CSS Mastery',
'instructor' => 'Adam Wathan',
'lessons' => [18, 24],
'progress' => 75,
'enrolled' => 'Mar 3, 2026',
'certificate' => 'In progress',
],
[
'title' => 'Full-Stack Inertia.js',
'instructor' => 'Jonathan Reinink',
'lessons' => [12, 20],
'progress' => 60,
'enrolled' => 'Apr 15, 2026',
'certificate' => 'In progress',
],
[
'title' => 'Alpine.js Deep Dive',
'instructor' => 'Caleb Porzio',
'lessons' => [5, 16],
'progress' => 31,
'enrolled' => 'May 22, 2026',
'certificate' => 'In progress',
],
[
'title' => 'Testing with Pest',
'instructor' => 'Nuno Maduro',
'lessons' => [16, 16],
'progress' => 100,
'enrolled' => 'Feb 8, 2026',
'certificate' => 'Earned',
],
[
'title' => 'Docker for PHP Developers',
'instructor' => 'Chris Fidao',
'lessons' => [0, 18],
'progress' => 0,
'enrolled' => 'Jun 17, 2026',
'certificate' => 'Locked',
],
];
$certVariant = [
'Earned' => 'success',
'In progress' => 'secondary',
'Locked' => 'outline',
];
@endphp
<x-ui.section space="xl" {{ $attributes }}>
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<x-ui.card>
{{-- Card header --}}
<div class="flex flex-wrap items-center justify-between gap-2 border-b border-border px-6 py-4">
<div>
<h2 class="text-base font-semibold">{{ $title }}</h2>
<p class="mt-0.5 text-xs text-muted-foreground">{{ $summary }}</p>
</div>
</div>
{{-- Table --}}
<div class="overflow-x-auto">
<x-ui.table>
<x-ui.table.header>
<x-ui.table.row>
<x-ui.table.head scope="col">{{ __('Course') }}</x-ui.table.head>
<x-ui.table.head scope="col">{{ __('Lessons') }}</x-ui.table.head>
<x-ui.table.head scope="col" class="min-w-40">{{ __('Progress') }}</x-ui.table.head>
<x-ui.table.head scope="col">{{ __('Enrolled') }}</x-ui.table.head>
<x-ui.table.head scope="col">{{ __('Certificate') }}</x-ui.table.head>
</x-ui.table.row>
</x-ui.table.header>
<x-ui.table.body>
@foreach ($courses as $course)
<x-ui.table.row>
{{-- Course title + instructor --}}
<x-ui.table.cell>
<div class="flex items-center gap-4">
{{-- Thumbnail placeholder --}}
<div
class="hidden size-10 shrink-0 rounded-md bg-muted sm:block"
aria-hidden="true"
></div>
<div class="min-w-0">
<p class="truncate text-sm font-medium">{{ $course['title'] }}</p>
<p class="truncate text-xs text-muted-foreground">
{{ __('by') }} {{ $course['instructor'] }}
</p>
</div>
</div>
</x-ui.table.cell>
{{-- Lessons count --}}
<x-ui.table.cell class="tabular-nums text-sm text-muted-foreground whitespace-nowrap">
{{ $course['lessons'][0] }} / {{ $course['lessons'][1] }}
</x-ui.table.cell>
{{-- Progress bar + caption --}}
<x-ui.table.cell>
<div class="flex min-w-32 items-center gap-2">
<div class="flex-1">
<x-ui.progress :value="$course['progress']" />
</div>
<span class="w-9 shrink-0 text-end text-xs tabular-nums text-muted-foreground">
{{ $course['progress'] }}%
</span>
</div>
</x-ui.table.cell>
{{-- Enrolled date --}}
<x-ui.table.cell class="text-sm text-muted-foreground whitespace-nowrap">
{{ $course['enrolled'] }}
</x-ui.table.cell>
{{-- Certificate badge --}}
<x-ui.table.cell>
<x-ui.badge :variant="$certVariant[$course['certificate']] ?? 'secondary'">
{{ __($course['certificate']) }}
</x-ui.badge>
</x-ui.table.cell>
</x-ui.table.row>
@endforeach
</x-ui.table.body>
</x-ui.table>
</div>
</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.0.4 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0