Plugin screenshot thumbnail 1/3
Plugin screenshot thumbnail 2/3
Plugin screenshot thumbnail 3/3

Twig Grab adds a developer overlay to your Craft CMS site that lets you instantly identify which Twig template rendered any element on the page.

Press G (or tap the floating icon) to activate grab mode. Hover over any element to see its source template and line number highlighted in real time. Click to copy the full template context — including the element's HTML, template type, and complete template chain — straight to your clipboard.

The copied output gives you everything you need to jump to the right file:

[include] _components/card.twig:12

...

Template chain:

in block "content" at _pages/home.twig:45
in template at _layouts/base.twig:1

What it tracks:

  • Static and dynamic includes
  • Embeds and blocks
  • Full template ancestry from component all the way up to your layout

Works with dynamic content: Twig Grab uses a MutationObserver to automatically detect content injected by Alpine.js, Sprig, htmx, or any other JavaScript framework — no configuration needed.

Configurable shortcut: Customize the activation key via config/twig-grab.php if the default G key conflicts with your setup.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
0
Version
1.0.0
License
MIT
Compatibility
Craft 5
Last release
April 7, 2026
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs