Search 71 components and 72 controllers by name, category or description.
Reveal
Staggered entrance for direct or nested content with load or scroll triggers
Direct children
No per-item markup: CSS numbers the first children and the controller fills in the rest.
<hw:reveal class="grid gap-3 sm:grid-cols-3">
@foreach (['Deploy', 'Rollback', 'Metrics', 'Alerts', 'Audit log', 'Billing'] as $card)
<hw:card>
<hw:card.header>
<hw:card.title>{{ $card }}</hw:card.title>
</hw:card.header>
<hw:card.content class="text-sm text-muted-foreground">
A direct child, with no per-item markup.
</hw:card.content>
</hw:card>
@endforeach
</hw:reveal>
Explicit nested items
Use hw:reveal.item when the animated units are not direct children. The sequential index comes from the container — no counter in the Blade.
New environment
<hw:reveal as="section" delay="110ms" motion="flat" class="max-w-lg space-y-4">
<hw:reveal.item>
<h3 class="text-base font-medium">New environment</h3>
</hw:reveal.item>
<div class="rounded-lg border p-4 space-y-4">
<div class="grid gap-4 sm:grid-cols-2">
<hw:reveal.item>
<hw:field name="env_name" label="Name">
<hw:input placeholder="staging" />
</hw:field>
</hw:reveal.item>
<hw:reveal.item>
<hw:field name="env_region" label="Region">
<hw:input placeholder="sa-east-1" />
</hw:field>
</hw:reveal.item>
</div>
<hw:reveal.item as="section">
<hw:field name="env_notes" label="Notes">
<hw:textarea placeholder="Optional" />
</hw:field>
</hw:reveal.item>
</div>
<hw:reveal.item>
<hw:button>Create environment</hw:button>
</hw:reveal.item>
</hw:reveal>
Motions
rise, flat and fade. Reach for fade when the item contains a positioned overlay: it is the only one that omits filter and transform, which would otherwise create a containing block.
rise — Fade, blur and travel
flat — No filter
fade — Opacity only
<div class="grid gap-6 sm:grid-cols-3">
@foreach (['rise' => 'Fade, blur and travel', 'flat' => 'No filter', 'fade' => 'Opacity only'] as $motion => $note)
<div class="space-y-2">
<p class="text-xs font-mono uppercase tracking-wide text-muted-foreground">
{{ $motion }} — {{ $note }}
</p>
<hw:reveal :motion="$motion" stagger="120ms" duration="600ms" class="space-y-2">
@foreach (range(1, 3) as $i)
<div class="rounded-md border bg-card px-3 py-2 text-sm">Item {{ $i }}</div>
@endforeach
</hw:reveal>
</div>
@endforeach
</div>
Timing and your own keyframe
The props become custom properties. max-steps caps the growing delay on long lists, and --reveal-animation swaps the keyframe while keeping the timing formula.
stagger 90ms · duration 700ms · delay 200ms
max-steps 3 — the delay stops growing at the fourth item
--reveal-animation: an application keyframe
<div class="space-y-6">
<div class="space-y-2">
<p class="text-xs font-mono uppercase tracking-wide text-muted-foreground">
stagger 90ms · duration 700ms · delay 200ms
</p>
<hw:reveal stagger="90ms" duration="700ms" delay="200ms" class="flex flex-wrap gap-2">
@foreach (range(1, 8) as $i)
<hw:badge variant="secondary">{{ $i }}</hw:badge>
@endforeach
</hw:reveal>
</div>
<div class="space-y-2">
<p class="text-xs font-mono uppercase tracking-wide text-muted-foreground">
max-steps 3 — the delay stops growing at the fourth item
</p>
<hw:reveal stagger="150ms" :max-steps="3" class="flex flex-wrap gap-2">
@foreach (range(1, 8) as $i)
<hw:badge variant="outline">{{ $i }}</hw:badge>
@endforeach
</hw:reveal>
</div>
<div class="space-y-2">
<p class="text-xs font-mono uppercase tracking-wide text-muted-foreground">
--reveal-animation: an application keyframe
</p>
<hw:reveal style="--reveal-animation: demo-slide-in" stagger="90ms" duration="600ms" class="flex flex-wrap gap-2">
@foreach (range(1, 5) as $i)
<hw:badge>{{ $i }}</hw:badge>
@endforeach
</hw:reveal>
</div>
</div>
Scroll trigger
Each item is observed on its own. The 140vh block exercises the threshold ceiling and the last block exercises the dead zone left by the negative root-margin.
Scroll the page: each item is observed on its own and the stagger restarts per batch. The tall block exceeds the viewport and exercises the per-item threshold ceiling.
Block 1
Enters as it crosses the viewport.
Block 2
Enters as it crosses the viewport.
Block 3
Enters as it crosses the viewport.
Block 4
Enters as it crosses the viewport.
Block 5
Enters as it crosses the viewport.
Block 6
Enters as it crosses the viewport.
Tall block (140vh)
Taller than the viewport — it would never reach threshold 0.2 without the per-item ceiling.
Last block
It sits inside the dead zone the negative root-margin leaves at the end of the document.
once=false — replays when it leaves and comes back
<div class="space-y-8">
<p class="text-sm text-muted-foreground">
Scroll the page: each item is observed on its own and the stagger restarts per batch.
The tall block exceeds the viewport and exercises the per-item threshold ceiling.
</p>
<hw:reveal trigger="scroll" :threshold="0.2" stagger="80ms" class="space-y-4">
@foreach (range(1, 6) as $i)
<div class="rounded-lg border bg-card p-4">
<p class="font-medium">Block {{ $i }}</p>
<p class="text-sm text-muted-foreground">Enters as it crosses the viewport.</p>
</div>
@endforeach
<div class="rounded-lg border bg-card p-4" style="min-height: 140vh">
<p class="font-medium">Tall block (140vh)</p>
<p class="text-sm text-muted-foreground">
Taller than the viewport — it would never reach threshold 0.2 without the per-item ceiling.
</p>
</div>
<div class="rounded-lg border bg-card p-4">
<p class="font-medium">Last block</p>
<p class="text-sm text-muted-foreground">
It sits inside the dead zone the negative root-margin leaves at the end of the document.
</p>
</div>
</hw:reveal>
<div class="space-y-2">
<p class="text-xs font-mono uppercase tracking-wide text-muted-foreground">
once=false — replays when it leaves and comes back
</p>
<hw:reveal trigger="scroll" :once="false" stagger="80ms" class="space-y-3">
@foreach (range(1, 4) as $i)
<div class="rounded-lg border bg-card p-4 text-sm">Repeatable {{ $i }}</div>
@endforeach
</hw:reveal>
</div>
</div>
Inside overlays
Modal, Dropdown and Sheet: the cascade must not complete while the content is hidden, and a dropdown inside an item has to anchor without a containing block getting in the way.
Cascade over hidden content
The cascade must only complete once the overlay opens — never while the content is hidden.
Sheet
<div class="flex flex-wrap gap-3">
<hw:modal size="lg">
<hw:modal.trigger>Reveal inside a Modal</hw:modal.trigger>
<hw:modal.content>
<hw:modal.header>
<hw:modal.title>Cascade over hidden content</hw:modal.title>
<hw:modal.description>
The cascade must only complete once the overlay opens — never while the content is hidden.
</hw:modal.description>
</hw:modal.header>
<hw:reveal motion="fade" stagger="90ms" class="space-y-3 p-4">
<div class="rounded-md border px-3 py-2 text-sm">Item 1</div>
<div class="rounded-md border px-3 py-2 text-sm">Item 2</div>
<div>
<hw:dropdown>
<hw:dropdown.trigger>Dropdown inside the item</hw:dropdown.trigger>
<hw:dropdown.content>
<hw:dropdown.item>Must anchor to its trigger</hw:dropdown.item>
<hw:dropdown.item>No containing block from filter/transform</hw:dropdown.item>
</hw:dropdown.content>
</hw:dropdown>
</div>
</hw:reveal>
</hw:modal.content>
</hw:modal>
<hw:dropdown>
<hw:dropdown.trigger>Reveal inside a Dropdown</hw:dropdown.trigger>
<hw:dropdown.content>
<hw:reveal motion="fade" stagger="70ms" class="p-1">
<hw:dropdown.item>First</hw:dropdown.item>
<hw:dropdown.item>Second</hw:dropdown.item>
<hw:dropdown.item>Third</hw:dropdown.item>
</hw:reveal>
</hw:dropdown.content>
</hw:dropdown>
<hw:sheet>
<hw:sheet.trigger>Reveal inside a Sheet</hw:sheet.trigger>
<hw:sheet.content>
<hw:sheet.header>
<hw:sheet.title>Sheet</hw:sheet.title>
</hw:sheet.header>
<hw:reveal motion="rise" stagger="90ms" class="space-y-3 p-4">
<div class="rounded-md border px-3 py-2 text-sm">Item 1</div>
<div class="rounded-md border px-3 py-2 text-sm">Item 2</div>
<div class="rounded-md border px-3 py-2 text-sm">Item 3</div>
</hw:reveal>
</hw:sheet.content>
</hw:sheet>
</div>
Inside a Turbo Frame
The cascade runs when the frame renders, not on page load.
The frame loads content with its own Reveal. The cascade runs when the frame renders, not on page load.
Empty frame — load a batch.
<div class="space-y-4">
<p class="text-sm text-muted-foreground">
The frame loads content with its own Reveal. The cascade runs when the frame renders, not on page load.
</p>
<div class="flex gap-2">
<hw:button as="a" :href="route('components.reveal.frame', ['seed' => 1])" frame="reveal-frame">
Load batch A
</hw:button>
<hw:button as="a" variant="outline" :href="route('components.reveal.frame', ['seed' => 2])" frame="reveal-frame">
Load batch B
</hw:button>
</div>
<hw:frame id="reveal-frame" class="block rounded-lg border p-4">
<p class="text-sm text-muted-foreground">Empty frame — load a batch.</p>
</hw:frame>
</div>
Turbo Stream over a visible item
Swapping an already visible item is a replacement, not an entrance: the incoming content gets data-reveal-skip.
An already visible item is swapped by Turbo Stream. It must change in place rather than disappear
and re-enter — the controller stamps data-reveal-skip on the incoming content.
<div class="space-y-4">
<p class="text-sm text-muted-foreground">
An already visible item is swapped by Turbo Stream. It must change in place rather than disappear
and re-enter — the controller stamps <code>data-reveal-skip</code> on the incoming content.
</p>
<form action="{{ route('components.reveal.stream') }}" method="post">
@csrf
<hw:button type="submit">Swap item 2 through a stream</hw:button>
</form>
<hw:reveal stagger="80ms" class="space-y-2">
<div class="rounded-md border bg-card px-3 py-2 text-sm">Item 1</div>
@include('components-demo.examples.reveal.stream-item', ['stamp' => 'original'])
<div class="rounded-md border bg-card px-3 py-2 text-sm">Item 3</div>
</hw:reveal>
</div>
Integration: animated-number, progress and reveal:shown
Counters restart with the batch, progress indicators fill from zero, and the application coordinates through the event instead of coupling to the controller.
animated-number restarts when the batch appears and the hw:progress
indicator fills from zero, in step with the item that owns it. The reveal:shown counter
comes from an application controller listening to the event.
0
0
0
reveal:shown fired
0
time(s).
<div class="space-y-6" data-controller="reveal-probe" data-action="reveal:shown->reveal-probe#count">
<p class="text-sm text-muted-foreground">
<code>animated-number</code> restarts when the batch appears and the <code>hw:progress</code>
indicator fills from zero, in step with the item that owns it. The <code>reveal:shown</code> counter
comes from an application controller listening to the event.
</p>
<hw:reveal trigger="scroll" stagger="120ms" class="grid gap-4 sm:grid-cols-3">
@foreach ([['Requests', 128400, 72], ['Subscribers', 3120, 45], ['Uptime', 99, 99]] as [$label, $end, $progress])
<hw:card>
<hw:card.header>
<hw:card.title class="text-sm font-medium text-muted-foreground">{{ $label }}</hw:card.title>
</hw:card.header>
<hw:card.content class="space-y-3">
<p class="text-2xl font-semibold">
<span
data-controller="animated-number"
data-animated-number-end-value="{{ $end }}"
data-animated-number-duration-value="1200"
>0</span>
</p>
<hw:progress :value="$progress" />
</hw:card.content>
</hw:card>
@endforeach
</hw:reveal>
<p class="text-sm">
<code>reveal:shown</code> fired
<strong data-reveal-probe-target="count">0</strong>
time(s).
</p>
</div>