utilities
typography
Typography
Panda's typography utilities.
Panda provides utilities and style properties for styling text.
Font Properties
<div className={css({ fontFamily: 'mono' })} />| Prop | CSS Property | Token Category | 
|---|---|---|
| fontFamily | font-family | fonts | 
| fontSize | font-size | fontSizes | 
| fontWeight | font-weight | fontWeights | 
| letterSpacing | letter-spacing | letterSpacings | 
| lineHeight | line-height | lineHeights | 
| textDecorationColor | text-decoration-color | colors | 
| textEmphasisColor | text-emphasis-color | colors | 
| textIndent | text-indent | spacing | 
| textShadow | text-shadow | shadows | 
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>| Prop | CSS Property | Token Category | 
|---|---|---|
| lineClamp | webkit-line-clamp | none | 
| truncate | text-overflow | none | 
Text Styles
Utilities for applying a composition of typography properties.
<h1
  className={css({
    textStyle: 'heading/marketing'
  })}
>
  Hello World
</h1>| Prop | Config | 
|---|---|
| textStyle | textStyles |