Skip to content

Preview Blade Templates in macOS Finder with Quick Blade

Quick Blade is a macOS Quick Look extension that renders .blade.php files directly in Finder — no dev server, no database, no network connection required. Just select a file and press the space bar.

Published · Updated · 2 min read

Preview Blade Templates in macOS Finder with Quick Blade

What Is Quick Blade?

Quick Blade is a macOS Quick Look extension built by Tim Gavin that lets you preview .blade.php files directly inside Finder. Select any Blade template, press the space bar, and you get a rendered visual preview of the page — no running dev server, no database connection, and no network access required. Everything is read straight from disk.

What Quick Blade Does with a Template

When you trigger a Quick Look preview on a Blade file, Quick Blade performs several steps to produce a meaningful visual output:

  • Resolves the layout — finds and applies the surrounding layout file
  • Inlines compiled CSS — embeds your project's compiled stylesheet
  • Converts Blade directives to HTML — processes @if, @foreach, and other directives
  • Fills echoes with stand-in data — substitutes placeholder values for {{ $variable }} expressions
  • Styles Flux and Livewire tags — applies visual treatment to component tags from those libraries
  • Draws Finder thumbnails — generates thumbnail previews visible in icon view

How Layout Detection Works

Quick Blade locates the Laravel project root relative to the file you open. It then searches for the layout using three strategies, in order:

  1. An <x-layouts.name> anonymous component tag
  2. An @extends directive
  3. The layout attached to a Livewire component class

Files that have no layout still render against a built-in stylesheet. This also applies to Blade files that live outside a Laravel project entirely, so the tool degrades gracefully.

Installing Quick Blade

Installation is handled through Homebrew:

brew install --cask timgavin/tap/quick-blade

After installation, macOS will register the Quick Look extension automatically. Full installation instructions are available in the GitHub repository.

Key Takeaways

  • Quick Blade works entirely offline — no dev server or database needed
  • Supports layout resolution via <x-layouts>, @extends, and Livewire component classes
  • Handles Flux and Livewire component styling out of the box
  • Generates Finder thumbnails for Blade files in icon view
  • Installed in a single Homebrew command
  • Files outside a Laravel project still render with a built-in stylesheet

Where to Learn More

The source code is available on GitHub, and the project homepage with additional documentation is at quickblade.app.


Source: Laravel News — Preview Blade Templates in macOS Finder with Quick Blade

Frequently asked questions

Does Quick Blade require a running Laravel dev server to preview templates?

No. Quick Blade reads the project files directly from disk, so no dev server, database connection, or network access is needed to generate a preview.

How does Quick Blade find the layout for a Blade template?

Quick Blade looks for the layout in three ways: first an <x-layouts.name> component tag, then an @extends directive, and finally the layout attached to a Livewire component class. Files with no detected layout still render against a built-in stylesheet.

How do I install Quick Blade on macOS?

Run `brew install --cask timgavin/tap/quick-blade` in your terminal. After installation, macOS registers the Quick Look extension automatically.

Mohamed Said

About the author

Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

About GitHub LinkedIn WhatsApp Email Address My CV

Have a technical challenge?

Tell me what you’re building. I reply within two working days.

Discuss your project