Component
DataEnum
Published on
Description
The DataEnum component maps a raw value to a human-readable label using a provided enum object. It renders a <data> element with the original value preserved and the mapped label displayed.
Use DataEnum when displaying statuses, types, or any value that maps to a known set of labels. For numeric formatting, use DataNumber .
Example
Accessibility
- Renders as a
<data>element with the raw value preserved in thevalueattribute - Screen readers announce the mapped label text
- The semantic
<data>element preserves the machine-readable value for assistive technologies
Related
- DataNumber — for numeric formatting
- DataTime — for date formatting
- DataBytes — for file size formatting
Variables
None