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.

00PHP

Pushed todayCompare

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

READMEChangelogDependenciesVersionsUsed 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

20

—

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 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.

### 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)")

### 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

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

291.8k](/packages/webkinder-sproutset)[awkwardideas/switchblade

Extended blade directives for laravel

102.1k](/packages/awkwardideas-switchblade)

PHPackages © 2026

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