Skip to main content

Type Alias: DataAttributeProperties

type DataAttributeProperties = Readonly<
Partial<
Record<
`data-${string}`,
| boolean
| number
| string
| undefined
>
>
>;

Defined in: shared/types/componentProps.ts:66

Strongly-typed data-* attributes for automation and diagnostics.

Remarksโ€‹

These are intentionally limited to JSON-serializable primitives. React will stringify these values when emitting to the DOM.