PHPackages                             twentysixx/x-ray - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. twentysixx/x-ray

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

twentysixx/x-ray
================

A visual X-ray for Craft CMS Twig templates — hover any front-end element to see which template or component rendered it, and the variables it received.

1.0.2(1mo ago)04MITPHPPHP &gt;=8.2

Since Jun 22Pushed 1mo agoCompare

[ Source](https://github.com/TwentySixx-plugins/X-Ray)[ Packagist](https://packagist.org/packages/twentysixx/x-ray)[ Docs](https://github.com/TwentySix-plugins/X-Ray)[ RSS](/packages/twentysixx-x-ray/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

X-Ray
=====

[](#x-ray)

**A component X-ray for Craft CMS.** Inspect your front end from inside the control panel: hover any element to see which Twig template rendered it, and the props (variables) it received — without leaving the CP.

X-Ray wraps your component templates with an interactive overlay. Open the **X-Ray** section in the control panel, point it at any page, and hover. You get the template path, a component hierarchy, per-template render counts, fully-typed props, rich rendering for Craft elements/Matrix blocks/assets, a Globals browser, and one-click "open in editor" deep links.

---

Requirements
------------

[](#requirements)

- Craft CMS **5.0.0** or later
- PHP **8.2** or later
- Admin access (X-Ray only ever activates for logged-in admins)

Installation
------------

[](#installation)

From the **Plugin Store**: search for "X-Ray" in your control panel under **Plugins**, then click **Install**.

With **Composer**:

```
composer require twentysixx/x-ray
php craft plugin/install x-ray
```

Usage
-----

[](#usage)

1. Open **X-Ray** in the control-panel sidebar.
2. Enter a front-end URL (or use the configured Start URL) and load it in the viewer.
3. Click **Inspect** (or press Alt+I) and hover over the page.
4. The sidebar shows the rendered template, its hierarchy, and the props passed in. Click a component to pin it.

X-Ray activates a page by appending `?xray=1` (configurable) and is only ever served to logged-in admins — your public front end is never affected.

### Which templates get annotated

[](#which-templates-get-annotated)

By default, X-Ray annotates partials whose filename starts with `_` (e.g. `_components/_card.twig`). You can change the prefix, or switch to glob-based include/exclude patterns, in **Settings**. Templates that `extends` a layout or define `{% block %}`s are skipped automatically.

Settings
--------

[](#settings)

- **Start URL** — the URL the viewer loads first (defaults to the site base URL).
- **Activation parameter** — the query flag that turns X-Ray on (default `xray`).
- **Active mode** — always, only in dev mode, or only in listed environments.
- **Template wrapping** — filename prefix, plus include/exclude globs.
- **Appearance** — accent colour, highlight style, tooltip label.
- **Behaviour** — edit links, persistent selection, block external navigation.
- **Open in editor** — pick a default editor, or a picker shown on each click; optional local base-path mapping for Docker/DDEV/VM setups.

All settings can also be set in `config/x-ray.php` for environment-specific overrides.

Privacy
-------

[](#privacy)

X-Ray runs entirely within your own Craft install. It makes no external/network calls and is served only to authenticated admins.

Support
-------

[](#support)

- Issues:

License
-------

[](#license)

See [LICENSE.md](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/295957343?v=4)[TwentySix-plugins](/maintainers/TwentySix-plugins)[@TwentySix-plugins](https://github.com/TwentySix-plugins)

---

Top Contributors

[![TwentySix-plugins](https://avatars.githubusercontent.com/u/295957343?v=4)](https://github.com/TwentySix-plugins "TwentySix-plugins (5 commits)")[![RomeoAtoyan](https://avatars.githubusercontent.com/u/93704397?v=4)](https://github.com/RomeoAtoyan "RomeoAtoyan (1 commits)")

---

Tags

twigdebugcomponentstemplatesCraftcraftcmscraft-plugininspectordeveloper-tools

### Embed Badge

![Health badge](/badges/twentysixx-x-ray/health.svg)

```
[![Health](https://phpackages.com/badges/twentysixx-x-ray/health.svg)](https://phpackages.com/packages/twentysixx-x-ray)
```

###  Alternatives

[wbrowar/guide

A CMS Guide for Craft CMS.

6154.7k1](/packages/wbrowar-guide)[verbb/hyper

A user-friendly links field for Craft.

24153.5k14](/packages/verbb-hyper)[verbb/vizy

A flexible visual editor field for Craft.

4251.5k1](/packages/verbb-vizy)[jalendport/craft-preparse

A fieldtype that parses Twig when an element is saved and saves the result as plain text.

1078.1k](/packages/jalendport-craft-preparse)[viget/craft-classnames

Classnames plugin for Craft CMS

1115.5k1](/packages/viget-craft-classnames)[verbb/footnotes

Adds a footnotes feature to CKEditor fields and Twig templates.

213.6k](/packages/verbb-footnotes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
