Garden provides a type scale and a set of React components for rendering text clearly and consistently. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/zendeskgarden/website/llms.txt
Use this file to discover all available pages before exploring further.
@zendeskgarden/react-typography package contains all typography primitives used across Garden-based interfaces.
Installation
Type scale
Garden’s type scale is based on named size steps rather than raw pixel values. This makes it easier to apply consistent hierarchy without reaching for custom font sizes.| Component | Approximate size | Typical use |
|---|---|---|
SM | Small | Captions, helper text, metadata, fine print |
MD | Medium (base) | Body text, default paragraph content |
LG | Large | Subheadings, emphasized body copy |
XL | Extra large | Section headings, card titles |
XXL | Extra extra large | Page-level headings |
XXXL | Extra extra extra large | Hero headings, prominent display text |
tag prop to render the appropriate semantic HTML element while applying Garden’s visual styles independently.
Components
Size components
Import size components from the package and use thetag prop to control the rendered HTML element.
Semantic hierarchy
Garden separates visual size from semantic heading level. Use thetag prop to ensure proper document structure for accessibility and SEO, regardless of the visual size you need.
Font modifiers
Garden supports two font modifiers that can be applied to any typography component:isBold— renders text in a bold weightisMonospace— renders text in a monospace font, suitable for code-adjacent labels or data
Blockquote
UseBlockquote to present a body of text that originates from another source.
Ellipsis
UseEllipsis to automatically truncate overflowing text with an ellipsis and expose the full content via a native title attribute (shown on hover).
Heading levels and document structure
Maintain a logical heading hierarchy throughout each page. Garden components do not enforce hierarchy — you are responsible for ensuring thetag values form a coherent document outline.
Guidelines:
- Use exactly one
h1per page, typically the page title. - Do not skip levels (e.g., do not follow an
h2directly with anh4). - Use headings to describe sections, not for visual emphasis. If you need visual emphasis without a semantic heading, use
isBoldon aMDorLGcomponent.
Using typography with theming
Garden’s typography components inherit font-family, line-height, and color values from the Garden theme. Wrap your application inThemeProvider from @zendeskgarden/react-theming to apply Garden’s default theme, or supply a custom theme object.
Garden’s default typeface is system-ui, falling back to platform-native sans-serif fonts. This avoids loading a custom web font and ensures fast, consistent rendering across operating systems.