Skip to content

Properties

PropertyTypeDescription
elementHTMLElement
string
(optional) Defines the Element Type, like p.
size'x-small'
'small'
'basis'
'medium'
'large'
'x-large'
'xx-large'
(optional) Sets the font size, also sets the line-height if line prop is not set.
line'x-small'
'small'
'basis'
'medium'
'large'
'x-large'
'xx-large'
(optional) Sets the line height, will use same value as size if not set.
align'center'
'left'
'right'
(optional) Sets the text alignment.
family'basis'
'heading'
'monospace'
(optional) Sets the font family.
weight'regular'
'medium'
(optional) Sets the font weight.
decoration'italic'
'underline'
(optional) Sets the font decoration.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.
mediumboolean(deprecated) Tells the component to use the medium font-weight styling dnb-t__weight--medium. More details here.
boldboolean(deprecated) Tells the component to use the bold font-weight styling class dnb-t__weight--bold. More details here.
modifierstring(deprecated) String containing a combination of modifiers, used to set both font-size and weight in one property. e.g. x-small medium would make the paragraph extra small and medium.