---
id: "declarative-shadow-dom"
kind: "web-feature"
canonical: "https://timetostable.com/feature/declarative-shadow-dom"
baseline: "high"
bcd_version: "8.1.11"
web_features_version: "3.48.0"
---

# Declarative shadow DOM (`declarative-shadow-dom`)

The shadowrootmode attribute on <template> creates a shadow root without the use of JavaScript. It is a declarative alternative to the attachShadow() method.

- **Group**: HTML
- **Baseline**: Widely Available
- **Newly Available Date**: 2024-02-20
- **Widely Available Date**: 2026-08-20
- **Specification**: https://html.spec.whatwg.org/multipage/scripting.html#attr-template-shadowrootmode
- **Constituent BCD keys**: 9

## Browser Support Timeline

| Browser | Version | Release Date |
| --- | --- | --- |
| Chrome | 111 | 2023-03-07 |
| Chrome Android | 111 | 2023-03-07 |
| Edge | 111 | 2023-03-13 |
| Safari | 16.4 | 2023-03-27 |
| Safari on iOS | 16.4 | 2023-03-27 |
| Firefox | 123 | 2024-02-20 |
| Firefox for Android | 123 | 2024-02-20 |

