Utilities

Typography

Panda provides the following utilities or style properties for styling text.

Font Properties

<div className={css({ fontFamily: 'mono' })} />
PropCSS PropertyToken Category
fontFamilyfont-familyfonts
fontSizefont-sizefontSizes
fontWeightfont-weightfontWeights
letterSpacingletter-spacingletterSpacings
lineHeightline-heightlineHeights
textDecorationColortext-decoration-colorcolors
textEmphasisColortext-emphasis-colorcolors
textIndenttext-indentspacing
textShadowtext-shadowshadows

Line Clamp (Truncation)

How to truncate multi-line text

<div className={css({ lineClamp: 2 })}>Some long piece of text</div>
 
<div className={css({ lineClamp: 2 })}>Truncated text</div>
PropCSS PropertyToken Category
lineClampwebkit-line-clampnone
truncatetext-overflownone

Text Styles

Utilities for applying a composition of typography properties.

<h1
  className={css({
    textStyle: 'heading/marketing'
  })}
>
  Hello World
</h1>
PropConfig
textStyletextStyles