Skip to main content

Text

Use the Text component for text that is rendered without any semantic markup.

Import

import { Text } from '@dynatrace/strato-components-preview/typography';

Use cases

CodeSandbox

Variants

By setting the optional textStyle and fontStyle properties the style of the rendered text can be changed. While textStyle determines font weight and size, fontStyle can be used to define whether variable-width font for regular text or monospace font for code examples should be used.

CodeSandbox

Props

TextProps

Signature:

export declare type TextProps<E extends > = <E, >;

TextOwnProps

extends, , , , ,
NameTypeDefaultDescription
textStyle?
-Sets the text style. Variants include "base", "base-emphasized", etc.
fontStyle?
-Sets the font style. Can either be "text" or "code"

TextTruncationProps

NameTypeDefaultDescription
maxLines?
-Limits the text to the given number of lines and adds ellipsis if the text would need more lines.
Still have questions?
Find answers in the Dynatrace Community