Blur Vignette
A frame that keeps wrapped content sharp in the centre and progressively backdrop-blurs only the edges (Apple Vision Pro style), with configurable blur, inset, fade length and radius.
Preview
<x-ui.blur-vignette blur="14px" transition="48px" class="w-full max-w-sm rounded-xl">
<div class="grid h-56 grid-cols-6 gap-px bg-border">
@foreach (range(1, 30) as $cell)
<div class="flex items-center justify-center bg-card text-xs font-medium text-muted-foreground">{{ $cell }}</div>
@endforeach
</div>
</x-ui.blur-vignette>
Installation
php artisan ui:add blur-vignette
Registry contract
php artisan ui:add blur-vignette
writes only the files below. The CLI validates each file hash before writing and asks before it replaces a local change, unless you pass --force.
-
resources/views/components/ui/blur-vignette.blade.php
- Registry dependencies
- None — installs on its own.
- Packages
-
composer: jml/brok:^0.2
Use with AI
A brief for your coding agent: install command, usage, props, guidance and the rules. Copy it, or open a prompt about this component in an assistant.
# Brok UI: Blur Vignette (`blur-vignette`)
A frame that keeps wrapped content sharp in the centre and progressively backdrop-blurs only the edges (Apple Vision Pro style), with configurable blur, inset, fade length and radius.
Brok UI is a Laravel Blade component registry. Installed components are plain Blade files the app owns.
## Install
```bash
php artisan ui:add blur-vignette
```
## Usage
```blade
<x-ui.blur-vignette blur="14px" transition="48px" class="w-full max-w-sm rounded-xl">
<div class="grid h-56 grid-cols-6 gap-px bg-border">
@foreach (range(1, 30) as $cell)
<div class="flex items-center justify-center bg-card text-xs font-medium text-muted-foreground">{{ $cell }}</div>
@endforeach
</div>
</x-ui.blur-vignette>
```
## Props
- `blur` (string, default `20px`) — Maximum backdrop-blur strength applied at the very edge.
- `inset` (string, default `0px`) — Distance from the frame's edge where the blur effect starts.
- `transition` (string, default `60px`) — Length of the fade from sharp center to full edge blur.
- `radius` (string, default `0.75rem`) — Corner radius of the frame and its blur mask.
## Use when
- Use when image or video selection, preview, or media-based comparison is part of the task.
- Softening the edges of a photo, video, or hero image so it blends into the surrounding surface, Apple Vision Pro style.
- Wanting the center of the content to stay perfectly sharp while only the frame's edges progressively blur.
## Avoid when
- Do not require media-heavy interaction when a simpler text or list solution would be faster.
- The whole image should be uniformly blurred; apply a plain backdrop-blur or filter instead, or use scroll-fade when content only needs to fade out at a scrolling edge.
- The content must always render pixel-sharp end to end, such as a document preview; skip the vignette.
## Anti-patterns
- Requiring media-heavy interaction when text is faster
## Rules
- Use the `<brok:blur-vignette>` tag (or `<x-ui.blur-vignette>`) in Blade; do not rewrite the component.
- Prefer the documented props and variants over utility-class overrides; when a utility must win, use the `!` important modifier.
- Use semantic design tokens (`bg-primary`, `text-muted-foreground`), never raw colour utilities.
- Keep the `data-slot` attributes; they are the styling and test hooks.
## Links
- Docs: https://brokui.dev/docs/components/blur-vignette
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blur-vignette.json
Working in Claude Code, Cursor or Codex? Give the agent the whole registry through the MCP server or the Brok UI skill.
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| blur | string | 20px | Maximum backdrop-blur strength applied at the very edge. |
| inset | string | 0px | Distance from the frame's edge where the blur effect starts. |
| transition | string | 60px | Length of the fade from sharp center to full edge blur. |
| radius | string | 0.75rem | Corner radius of the frame and its blur mask. |
Slots
default— Media or content the vignette is applied over.
Data slots
Stable hooks for CSS overrides and browser tests.
Behavior
- Layers a progressive backdrop-blur overlay over the wrapped content, masked so the blur strength ramps up from none in the center to full strength at the edge.
- Declares registry capability flags: a11y, responsive, rtl, darkMode, localized.
Guidance
Select, preview, or compare visual media.
Use when
- Use when image or video selection, preview, or media-based comparison is part of the task.
- Softening the edges of a photo, video, or hero image so it blends into the surrounding surface, Apple Vision Pro style.
- Wanting the center of the content to stay perfectly sharp while only the frame's edges progressively blur.
Avoid when
- Do not require media-heavy interaction when a simpler text or list solution would be faster.
- The whole image should be uniformly blurred; apply a plain backdrop-blur or filter instead, or use scroll-fade when content only needs to fade out at a scrolling edge.
- The content must always render pixel-sharp end to end, such as a document preview; skip the vignette.
Use instead
- Text or list representation
Anti-patterns
- Requiring media-heavy interaction when text is faster
- Anatomy
- Theming hooks
Accessibility
- Keyboard
- No component-owned keyboard interaction; native element behavior applies.
- Focus
none
- The vignette is a purely visual effect layered over the content and does not affect the underlying content's semantics or focus order.
- Semantic HTML and a stable
data-slotattribute for styling and scripting hooks. - Focus-visible rings use the
ringtoken, so keyboard focus is always visible. - Disabled and invalid states are conveyed to assistive tech, not by color alone.
- Targets WCAG 2.2 AA; verify contrast in light, dark, admin and customer surfaces in the preview.
- Labels go through
__()and layout uses logical properties (ms-*,text-start), so it mirrors underdir="rtl"— flip the preview to RTL to confirm. - Dark mode uses the same semantic tokens under the
darkclass; high contrast follows forced-color system tokens.
Livewire
Livewire can update this component through forwarded wire:* attributes.
Source
The exact, editable file ui:add writes
into your app. Previews render this same code; there are no preview-only components.
@props([
'blur' => '20px',
'inset' => '0px',
'transition' => '60px',
'radius' => '0.75rem',
])
@php
// Blur Vignette — an Apple-Vision-Pro-style frame that keeps the centre of
// its content sharp and progressively backdrop-blurs only the rim. The
// overlay sits ABOVE the content (so its backdrop-filter blurs what is
// behind it) and is masked with four edge-band gradients (union) so the
// blur is painted at the edges and fades to nothing toward the centre.
//
// - `blur` : edge blur radius (any CSS length).
// - `inset` : pull the vignette frame inward from the bounds.
// - `transition` : how far the blur fades from each edge toward the centre.
// - `radius` : corner radius (kept in sync with the wrapped content).
//
// The mask uses the `black`/`transparent` keywords (an alpha mask, not a
// theme colour) so it never hardcodes a palette value. The overlay is
// decorative: aria-hidden + pointer-events-none.
@endphp
<div
data-slot="blur-vignette"
style="--bv-blur: {{ $blur }}; --bv-inset: {{ $inset }}; --bv-len: {{ $transition }}; --bv-radius: {{ $radius }};"
{{ $attributes->merge(['class' => 'relative overflow-hidden']) }}
>
<div class="relative">{{ $slot }}</div>
<div data-slot="blur-vignette-overlay" aria-hidden="true" class="pointer-events-none absolute inset-0"></div>
</div>
Ownership & lifecycle
Owner, release state, review evidence and adoption for this item.
- Owner
- Platform UI (@JoshJML)
- Current version
-
1.0.3 - Status
- Stable
- License
-
open - Accessibility reviewed
- No review date recorded
- Last breaking change
- No date recorded
- Deprecation
- Not deprecated
- Contract
-
v6 - Foundation
-
≥ 1.0.0