Utility Reference
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 |
textWrap | text-wrap | — |
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 |
Full reference
Generated from @pandacss/preset-base, so this table always matches the utilities Panda ships.
Typography · 34
| Property | Shorthand | Class | Values |
|---|---|---|---|
| fontFamily | — | ff | fonts |
| fontFeatureSettings | — | ff-s | — |
| fontKerning | — | fk | — |
| fontPalette | — | fp | — |
| fontSize | — | fs | fontSizes |
| fontSizeAdjust | — | fs-a | — |
| fontSmoothing | — | fsmt | antialiased | subpixel-antialiased |
| fontVariant | — | fv | — |
| fontVariantAlternates | — | fv-alt | — |
| fontVariantCaps | — | fv-caps | — |
| fontVariantNumeric | — | fv-num | — |
| fontVariationSettings | — | fv-s | — |
| fontWeight | — | fw | fontWeights |
| letterSpacing | — | ls | letterSpacings |
| lineClamp | — | lc | — |
| lineHeight | — | lh | lineHeights |
| textAlign | — | ta | — |
| textDecoration | — | td | — |
| textDecorationColor | — | td-c | colors |
| textDecorationStyle | — | td-s | — |
| textDecorationThickness | — | td-t | — |
| textEmphasisColor | — | te-c | colors |
| textIndent | — | ti | spacing |
| textOverflow | — | tov | — |
| textShadow | — | tsh | shadows |
| textShadowColor | textShadowColor | tsh-c | colors |
| textSizeAdjust | — | txt-adj | — |
| textTransform | — | tt | — |
| textUnderlineOffset | — | tu-o | — |
| textWrap | — | tw | — |
| truncate | — | trunc | type |
| verticalAlign | — | va | — |
| WebkitTextFillColor | — | wktf-c | colors |
| wordBreak | — | wb | — |