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

::data-attributes
::

## Usage

List the attributes under `dataAttributes`, then place the table.

```mdc
---
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.

```mdc
::data-attributes{part="Accordion.View"}
::
```

::data-attributes{part="Accordion.View"}
::
