CardText

Surface
stable

Card body text section. A flex-grow container with density-aware padding and body typography defaults.

Aperçu

Rendu de l’aperçu en cours…

with text prop

Rendu de l’aperçu en cours…

compact density

Rendu de l’aperçu en cours…

comfortable density

Structure

Anatomie

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

Anatomy of OrigamCardTextSchematic of the CardText component with 2 numbered parts. Body text or #default slot content font-size: 0.875rem · flex: 1 1 auto 1 2 origam-card-text
Anatomy of <origam-card-text> — root container ① (flex: 1 1 auto) with density-aware padding ② wrapping the body text or #default slot.
1.origam-card-text
Root element (default: <div>). flex: 1 1 auto so it fills available card height. font-size: 0.875rem, font-weight: 400. Padding is density-adjusted.
2(content / #default slot)
Inner content: renders <span>{{ text }}</span> when the text prop is provided, or the #default slot for richer content.

API

Props

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

text
string | number
Text content rendered inside a <span>. Overridable with the #default slot for richer content.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root. Defaults to <div>; can be changed to <p>, <section>, etc.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the text container.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
Border-radius for the text container.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
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
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
density
'default'
Density modifier adjusting the block and inline padding via --origam-card-text---density.
fontSize
TFontSize
fontWeight
TFontWeight
letterSpacing
TLetterSpacing

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Overrides the text prop. Use for rich HTML content (paragraphs, lists, etc.) inside the card body.

API

Membres exposés

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

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle from the computed cardTextStyles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

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.

Flex grow/shrink/basis for the text area. 1 1 auto ensures it fills available vertical space.
Body text font size (0.875rem = 14px).
Body text font weight (normal).
Letter spacing applied to body text.
Block-start padding (density-adjusted at render time).
Block-end padding (density-adjusted).
Inline-start padding (density-adjusted).
Inline-end padding (density-adjusted).
Density offset added to all four padding values. compact: −8px, default: 0px, comfortable: +8px.

Inclusion

Accessibilité

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

Notes

  • OrigamCardText renders as a <div> by default. When the content is a paragraph of text, consider passing tag="p" or wrapping inner content in <p> tags for correct semantics. Avoid placing block-level elements inside a <p> tag if you change the root tag.
  • CardText is not interactive and does not receive focus. Interactive elements inside the text (links, buttons) manage their own focus and keyboard interaction.

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

vue

Rich slot content

vue

Compact density

vue

Écosystème

Famille

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