DataText

Data Display
stable

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.

Anatomy of OrigamDataTextA dd element with optional prepend, content and append spans. 1 2 3 4
Anatomy of <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.

text
required
string | number
Value content rendered in the default slot when no slot override is provided.
id
string
class
string | Array<string> | object
hoverColor
Text colour applied on hover. Falls back to color when absent.
style
string | Array<string> | object | StyleValue
hoverBgColor
Background colour applied on hover.
appendAvatar
string
Image URL for an avatar rendered in the append area.
appendIcon
MDI icon rendered in the append slot when no slot override is provided.
prependAvatar
string
Image URL for an avatar rendered in the prepend area.
prependIcon
MDI icon rendered in the prepend slot when no slot override is provided.
prependAriaLabel
string
appendAriaLabel
string
density
Density modifier forwarded to prepend/append icons and avatars.
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | 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:append
MouseEvent
Fired when the append area is clicked.
@click:prepend
MouseEvent
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.

Source
dimension
var(--origam-font__size---md)
Value text font size.
color
var(--origam-color__text---primary)
Value text colour.
number
var(--origam-font__lineHeight---normal)
Value text line height.
dimension
var(--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

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.