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
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.
Props
TextProps
Signature:
export declare type TextProps<E extends > = <E, >;
TextOwnProps
extends
, , , , ,
Name | Type | Default | Description |
---|---|---|---|
textStyle? | - | Sets the text style. Variants include "base", "base-emphasized", etc. | |
fontStyle? | - | Sets the font style. Can either be "text" or "code" |
TextTruncationProps
Name | Type | Default | Description |
---|---|---|---|
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