Data Attributes
A reference table of the data attributes a component sets, read from the page’s front matter.
A data attributes table lists the attributes a component sets on its elements. The rows live in the page’s front matter, where tools can read them as data.
Usage
List the attributes under dataAttributes, then place the table.
---
dataAttributes:
- attribute: data-state
part: Accordion.Content
values: 'open | closed'
description: Always present.
---
::data-attributes
::
An attribute without values is a flag and reads true. With part, the table lists only the attributes of that part.
::data-attributes{part="Accordion.View"}
::