Flight Status Card
A boarding-pass style flight status card with airline, flight number, status badge, origin/destination route, an animated plane gliding along the flight path, gate/terminal/boarding/seat details, and a perforated divider with a barcode strip.
Preview
@props([
'airline' => 'Northstar Air',
'flightNumber' => 'JM 2042',
'status' => 'On Time',
'statusVariant' => 'success',
'originCode' => 'AMS',
'originCity' => 'Amsterdam',
'departTime' => '09:45',
'destinationCode' => 'JFK',
'destinationCity' => 'New York',
'arriveTime' => '12:20',
'gate' => 'D7',
'terminal' => '2',
'boarding' => '09:05',
'seat' => '14C',
'glideDuration' => '6s',
])
<article
data-slot="flight-status-card"
{{ $attributes->merge(['class' => 'max-w-sm rounded-lg border border-border bg-card text-card-foreground shadow-sm overflow-hidden']) }}
>
{{-- Header --}}
<div class="flex items-start justify-between gap-4 px-6 pt-6">
<div class="min-w-0">
<p class="truncate text-sm font-semibold text-foreground">{{ __($airline) }}</p>
<p class="mt-0.5 text-2xs font-medium text-muted-foreground">{{ __('Flight') }} {{ $flightNumber }}</p>
</div>
<x-ui.badge :variant="$statusVariant" class="shrink-0">{{ __($status) }}</x-ui.badge>
</div>
{{-- Route --}}
<div class="flex items-center gap-4 px-6 py-6">
{{-- Origin --}}
<div class="min-w-0 text-start">
<p class="text-3xl font-bold leading-none tracking-tight text-foreground">{{ $originCode }}</p>
<p class="mt-2 truncate text-2xs text-muted-foreground">{{ __($originCity) }}</p>
<p class="mt-0.5 text-sm font-medium text-foreground">{{ $departTime }}</p>
</div>
{{-- Flight path (decorative) --}}
<div class="relative flex-1 self-start pt-2" aria-hidden="true">
<div class="relative flex items-center">
<span class="size-2 shrink-0 rounded-full bg-muted-foreground/60"></span>
<span class="mx-2 flex-1 border-t border-dashed border-border"></span>
<span class="size-2 shrink-0 rounded-full bg-muted-foreground/60"></span>
{{-- Plane: glides along the path by animating `left` (relative to
the full-width path), so it actually traverses dot→dot. The
wrapper's -translate-y-1/2 centres it vertically and is left
untouched by the keyframe (which animates `left` only). Under
reduced motion the animation is dropped and it rests at the
path centre via the inline base `left`. --}}
<span
class="pointer-events-none absolute top-1/2 -translate-y-1/2 text-primary motion-safe:animate-[ui-plane-glide_var(--ui-plane-duration,6s)_ease-in-out_infinite]"
style="--ui-plane-duration: {{ $glideDuration }}; left: calc(50% - 0.5rem);"
>
<svg
class="size-4 rtl:-scale-x-100"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5L21 16Z" />
</svg>
</span>
</div>
</div>
{{-- Destination --}}
<div class="min-w-0 text-end">
<p class="text-3xl font-bold leading-none tracking-tight text-foreground">{{ $destinationCode }}</p>
<p class="mt-2 truncate text-2xs text-muted-foreground">{{ __($destinationCity) }}</p>
<p class="mt-0.5 text-sm font-medium text-foreground">{{ $arriveTime }}</p>
</div>
</div>
{{-- Details --}}
<dl class="grid grid-cols-4 gap-2 px-6 pb-6">
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Gate') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $gate }}</dd>
</div>
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Terminal') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $terminal }}</dd>
</div>
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Boarding') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $boarding }}</dd>
</div>
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Seat') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $seat }}</dd>
</div>
</dl>
{{-- Perforated divider (decorative) --}}
<div class="relative flex items-center" aria-hidden="true">
<span class="-ms-2 size-4 shrink-0 rounded-full bg-background"></span>
<span class="flex-1 border-t border-dashed border-border"></span>
<span class="-me-2 size-4 shrink-0 rounded-full bg-background"></span>
</div>
{{-- Barcode strip (decorative) --}}
<div class="px-6 py-6">
<div
class="h-12 w-full rounded-sm text-foreground"
style="background-image: repeating-linear-gradient(90deg, currentColor 0, currentColor 2px, transparent 2px, transparent 4px, currentColor 4px, currentColor 5px, transparent 5px, transparent 9px);"
aria-hidden="true"
></div>
</div>
</article>
Installation
php artisan ui:add blocks/flight-status-card
Registry contract
Install confidence
php artisan ui:add blocks/flight-status-card
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/flight-status-card.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: Flight Status Card (`flight-status-card`)
A boarding-pass style flight status card with airline, flight number, status badge, origin/destination route, an animated plane gliding along the flight path, gate/terminal/boarding/seat details, and a perforated divider with a barcode strip.
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/flight-status-card
```
## Render it
```blade
<x-blocks.flight-status-card />
```
## Props
- `airline` (string, default `Northstar Air`)
- `flight-number` (string, default `JM 2042`)
- `status` (string, default `On Time`)
- `status-variant` (string, default `success`)
- `origin-code` (string, default `AMS`)
- `origin-city` (string, default `Amsterdam`)
- `depart-time` (string, default `09:45`)
- `destination-code` (string, default `JFK`)
- `destination-city` (string, default `New York`)
- `arrive-time` (string, default `12:20`)
- `gate` (string, default `D7`)
- `terminal` (string, default `2`)
- `boarding` (string, default `09:05`)
- `seat` (string, default `14C`)
- `glide-duration` (string, default `6s`)
## Use when
- Showing a boarding-pass style flight status card with airline, flight number, status badge and origin/destination route.
- Animating a plane gliding along the flight path between gate/terminal/boarding/seat details and a barcode strip.
## Avoid when
- This is a self-contained travel widget; use dashboard-widget-repo/02 for a generic app status tile instead.
## Rules
- Render the installed block with `<x-blocks.flight-status-card />` 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/flight-status-card
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/flight-status-card.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
- Showing a boarding-pass style flight status card with airline, flight number, status badge and origin/destination route.
- Animating a plane gliding along the flight path between gate/terminal/boarding/seat details and a barcode strip.
Avoid when
- This is a self-contained travel widget; use dashboard-widget-repo/02 for a generic app status tile instead.
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.flight-status-card />
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([
'airline' => 'Northstar Air',
'flightNumber' => 'JM 2042',
'status' => 'On Time',
'statusVariant' => 'success',
'originCode' => 'AMS',
'originCity' => 'Amsterdam',
'departTime' => '09:45',
'destinationCode' => 'JFK',
'destinationCity' => 'New York',
'arriveTime' => '12:20',
'gate' => 'D7',
'terminal' => '2',
'boarding' => '09:05',
'seat' => '14C',
'glideDuration' => '6s',
])
<article
data-slot="flight-status-card"
{{ $attributes->merge(['class' => 'max-w-sm rounded-lg border border-border bg-card text-card-foreground shadow-sm overflow-hidden']) }}
>
{{-- Header --}}
<div class="flex items-start justify-between gap-4 px-6 pt-6">
<div class="min-w-0">
<p class="truncate text-sm font-semibold text-foreground">{{ __($airline) }}</p>
<p class="mt-0.5 text-2xs font-medium text-muted-foreground">{{ __('Flight') }} {{ $flightNumber }}</p>
</div>
<x-ui.badge :variant="$statusVariant" class="shrink-0">{{ __($status) }}</x-ui.badge>
</div>
{{-- Route --}}
<div class="flex items-center gap-4 px-6 py-6">
{{-- Origin --}}
<div class="min-w-0 text-start">
<p class="text-3xl font-bold leading-none tracking-tight text-foreground">{{ $originCode }}</p>
<p class="mt-2 truncate text-2xs text-muted-foreground">{{ __($originCity) }}</p>
<p class="mt-0.5 text-sm font-medium text-foreground">{{ $departTime }}</p>
</div>
{{-- Flight path (decorative) --}}
<div class="relative flex-1 self-start pt-2" aria-hidden="true">
<div class="relative flex items-center">
<span class="size-2 shrink-0 rounded-full bg-muted-foreground/60"></span>
<span class="mx-2 flex-1 border-t border-dashed border-border"></span>
<span class="size-2 shrink-0 rounded-full bg-muted-foreground/60"></span>
{{-- Plane: glides along the path by animating `left` (relative to
the full-width path), so it actually traverses dot→dot. The
wrapper's -translate-y-1/2 centres it vertically and is left
untouched by the keyframe (which animates `left` only). Under
reduced motion the animation is dropped and it rests at the
path centre via the inline base `left`. --}}
<span
class="pointer-events-none absolute top-1/2 -translate-y-1/2 text-primary motion-safe:animate-[ui-plane-glide_var(--ui-plane-duration,6s)_ease-in-out_infinite]"
style="--ui-plane-duration: {{ $glideDuration }}; left: calc(50% - 0.5rem);"
>
<svg
class="size-4 rtl:-scale-x-100"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5L21 16Z" />
</svg>
</span>
</div>
</div>
{{-- Destination --}}
<div class="min-w-0 text-end">
<p class="text-3xl font-bold leading-none tracking-tight text-foreground">{{ $destinationCode }}</p>
<p class="mt-2 truncate text-2xs text-muted-foreground">{{ __($destinationCity) }}</p>
<p class="mt-0.5 text-sm font-medium text-foreground">{{ $arriveTime }}</p>
</div>
</div>
{{-- Details --}}
<dl class="grid grid-cols-4 gap-2 px-6 pb-6">
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Gate') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $gate }}</dd>
</div>
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Terminal') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $terminal }}</dd>
</div>
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Boarding') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $boarding }}</dd>
</div>
<div>
<dt class="text-2xs font-medium uppercase tracking-wide text-muted-foreground">{{ __('Seat') }}</dt>
<dd class="mt-0.5 text-sm font-semibold text-foreground">{{ $seat }}</dd>
</div>
</dl>
{{-- Perforated divider (decorative) --}}
<div class="relative flex items-center" aria-hidden="true">
<span class="-ms-2 size-4 shrink-0 rounded-full bg-background"></span>
<span class="flex-1 border-t border-dashed border-border"></span>
<span class="-me-2 size-4 shrink-0 rounded-full bg-background"></span>
</div>
{{-- Barcode strip (decorative) --}}
<div class="px-6 py-6">
<div
class="h-12 w-full rounded-sm text-foreground"
style="background-image: repeating-linear-gradient(90deg, currentColor 0, currentColor 2px, transparent 2px, transparent 4px, currentColor 4px, currentColor 5px, transparent 5px, transparent 9px);"
aria-hidden="true"
></div>
</div>
</article>
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