Part of the SDC ecosystem · 22 projects
SDC Inspector shows the Single Directory Components on a page as a tree, with the props and slots each one receives and the template that renders it. Use it to find where a component comes from and what to pass to it.
Features
- Component tree. Components are listed as they are nested on the page, inside the regions, blocks, entities, views and Layout Builder sections that render them.
- Props and slots. For each component: the value of each prop and slot, its schema, unset props with their defaults, and props it receives but does not declare.
- Rendered by. The Twig template and line that included the component.
- Templates. For regions, blocks, entities and views: the template in use and the template suggestions, most specific first.
- Find it on the page. Select an item in the tree to highlight it on the page, or click a part of the page to select the component that rendered it. Search the tree by name.
- Twig snippet. Copy an
include()of the selected component with its current values. - Docks at the bottom or on the right of the window, and works with the keyboard.
Installation
composer require drupal/sdc_inspector drush en sdc_inspector drush cr
Configuration
- Go to Configuration › Development › SDC Inspector (
/admin/config/development/sdc-inspector). The page shows whether Twig debug mode is on, and links to the setting when it is off. The inspector needs Twig debug mode. - Give the Use SDC Inspector permission to developer roles. Pages for users without it do not change.
Usage
- Pages show an SDC button with the number of components. Click it to open the inspector.
- Select an item in the tree to see its details and highlight it on the page. To go the other way, press Pick from the page (cursor button) and click any part of the page.
- Narrow the tree with the search field, Show (funnel button: which types of items it lists) and Isolate (target button: only the selected item, its children and its ancestors).
Development only
The inspector exposes internal values such as props, URLs and entity labels. Do not enable it on production sites.
Ask your assistant about SDC Inspector
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the SDC ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha1 | Pre-release | 11 | Dec 1, 2026 | ||
| 1.0.x-dev | Dev | 11 | Dec 1, 2026 |