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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

text
requis
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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@click:append
MouseEvent
Fired when the append area is clicked.
@click:prepend
MouseEvent
Fired when the prepend area is clicked.

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

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

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Font size of the value text.
Text colour of the value cell.
Line height of the value text.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic usage inside DataList

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.