Global Attributes

HTML exportparts attribute

Exposes named CSS parts through a nested shadow host, optionally renaming them. It does not expose arbitrary shadow DOM nodes; a matching part must exist. Applicability: global HTML attribute, subject to element-specific restrictions and browser support. Example is a markup pattern requiring the indicated component, resource or server configuration.

Formal Syntax & Structure

html syntaxhtml
exportparts="label:outer-label"

Parameters & Attributes

NameTypeDescription
exportpartspart name mappingsExposes named CSS parts through a nested shadow host, optionally renaming them. It does not expose arbitrary shadow DOM nodes; a matching part must exist.

Working Example

Example Snippethtml
<inner-widget exportparts="label:outer-label"></inner-widget>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
73
Yes
Firefox
72
Yes
Safari
13.1
Yes
Checked desktop BCD snapshot: global exportparts attribute. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
CSS Shadow Parts
HTML Reference