Skip to content

Want to skip the docs? Check out pandamastery.com - the best way to learn Panda CSS

Utility Reference

Typography

Panda's typography utilities.

Panda provides utilities and 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
textWraptext-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>
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

Full reference

Generated from @pandacss/preset-base, so this table always matches the utilities Panda ships.

Typography · 34
PropertyShorthandClassValues
fontFamily—fffonts
fontFeatureSettings—ff-s—
fontKerning—fk—
fontPalette—fp—
fontSize—fsfontSizes
fontSizeAdjust—fs-a—
fontSmoothing—fsmtantialiased | subpixel-antialiased
fontVariant—fv—
fontVariantAlternates—fv-alt—
fontVariantCaps—fv-caps—
fontVariantNumeric—fv-num—
fontVariationSettings—fv-s—
fontWeight—fwfontWeights
letterSpacing—lsletterSpacings
lineClamp—lc—
lineHeight—lhlineHeights
textAlign—ta—
textDecoration—td—
textDecorationColor—td-ccolors
textDecorationStyle—td-s—
textDecorationThickness—td-t—
textEmphasisColor—te-ccolors
textIndent—tispacing
textOverflow—tov—
textShadow—tshshadows
textShadowColortextShadowColortsh-ccolors
textSizeAdjust—txt-adj—
textTransform—tt—
textUnderlineOffset—tu-o—
textWrap—tw—
truncate—trunctype
verticalAlign—va—
WebkitTextFillColor—wktf-ccolors
wordBreak—wb—
Edit this page on GitHubView as markdown
Last updated on