DataText
Term-definition value cell rendered as a <dd> element. Displays text content with optional prepend/append avatar or icon. Used inside OrigamDataList to pair with OrigamDataTitle.
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-data-text> — 4 parts: root <dd> ①, prepend area ②, content span ③, append area ④.- 1.origam-data-text
- Root
- element.
- 2.origam-data-text__prepend
- Prepend span hosting avatar or icon.
- 3.origam-data-text__content
- Content span with data-no-activator attribute.
- 4.origam-data-text__append
- Append span hosting avatar or icon.
API
Props
All props accepted by this component, with their type, default value and description.
- textrequiredstring | number
- Value content rendered in the default slot when no slot override is provided.
- idstring
- classstring | Array<string> | object
- hoverColor
- Text colour applied on hover. Falls back to color when absent.
- stylestring | Array<string> | object | StyleValue
- hoverBgColor
- Background colour applied on hover.
- appendAvatarstring
- Image URL for an avatar rendered in the append area.
- appendIcon
- MDI icon rendered in the append slot when no slot override is provided.
- prependAvatarstring
- Image URL for an avatar rendered in the prepend area.
- prependIcon
- MDI icon rendered in the prepend slot when no slot override is provided.
- prependAriaLabelstring
- appendAriaLabelstring
- density
- Density modifier forwarded to prepend/append icons and avatars.
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- color
- Text colour — tokenised intent value or custom CSS colour.
- bgColor
- Background colour of the cell.
API
Slots
Content slots exposed by this component.
- #default
- Value content. Falls back to the text prop.
- #prepend
- Custom content before the value. When absent, renders prependAvatar or prependIcon.
- #append
- Custom content after the value. When absent, renders appendAvatar or appendIcon.
API
Emits
Events emitted by this component.
- @click:appendMouseEvent
- Fired when the append area is clicked.
- @click:prependMouseEvent
- Fired when the prepend area is clicked.
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- (props: IDataTextProps, exclude?: string[]) => Partial<IDataTextProps>
- Filters component props for forwarding to child components.
- ComputedRef<string>
- Serialised scoped CSS string.
- string
- Unique style scope identifier.
- () => void
- Mounts the scoped style sheet.
- () => void
- Unmounts the scoped style sheet.
- Ref<boolean>
- Whether the scoped style sheet is currently mounted.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Font size of the value text.
- Text colour of the value cell.
- Line height of the value text.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
Notes
- Rendered as a <dd> element — semantically correct value cell in a description list.
- The v-contrast directive adjusts text colour automatically for sufficient contrast.
Foundation
Design tokens
Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.
- dimensionvar(--origam-font__size---md)
- Value text font size.
- colorvar(--origam-color__text---primary)
- Value text colour.
- numbervar(--origam-font__lineHeight---normal)
- Value text line height.
- dimensionvar(--origam-font__letterSpacing---normal)
- Value text letter spacing.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic usage inside DataList
Ecosystem
Family
Components from the same folder that share conventions and often compose together.