Garden 9 is now available.
The website has been updated to the latest major version. View previous versions
Skip to main content
Design
Components
Patterns
    • Introduction
      • Overview
    • Foundations
      • Bedrock CSS
      • Design tokens
      • Containers
      • Theming
      • Versions
    • Components
      • Accordion
      • Anchor
      • Avatar
      • Breadcrumbs
      • Buttons
      • Chrome
      • Code block
      • Color picker
      • Color swatch
      • Date picker
      • Draggable
      • Drawer
      • Forms
      • Grid
      • Loaders
      • Menu
      • Modal
      • Notification
      • Pagination
      • Pane
      • Sheet
      • Status indicator
      • Stepper
      • Table
      • Tabs
      • Tags
      • Tiles
      • Timeline
      • Tooltip
      • Tooltip dialog
      • Typography
        • Code
        • Lists
        • Paragraph
        • Span
        • Typography
      • Well
    Table of Contents
    • How to use it
      • Bold
      • Hue
      • Icons
      • Monospace
    • Configuration
    • API
      • MD
      • Paragraph
      • Span

    Span

    Use Span to style and format inline text elements.


    Table of Contents
    • How to use it
      • Bold
      • Hue
      • Icons
      • Monospace
    • Configuration
    • API
      • MD
      • Paragraph
      • Span

    Used for this
    • To apply styles to short strings of text
    • To include icons inline with text
    Not for this
    • To style an entire block of text, use Paragraph instead

    How to use it

    Bold

    To apply bold styling without indicating semantic importance, use isBold.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Hue

    The color of a span is specified with hue. Use a color variable key or PALETTE color when possible.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Icons

    To include an icon at the beginning of a span, use <Span.StartIcon>.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    To include an icon anywhere else in the span, use <Span.Icon>.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Monospace

    Apply a fixed-width type treatment using isMonospace.

    Toggle dark mode
    Set primary hue
    Toggle RTL
    Open in CodeSandbox
    Copy code
    View code

    Configuration

    • Name9.5.3•View source•View on npm
    • Installnpm install @zendeskgarden/react-typography
    • Depsnpm install react react-dom styled-components @zendeskgarden/react-theming
    • Importimport { MD, Paragraph, Span } from '@zendeskgarden/react-typography'

    API

    MD

    Extends HTMLAttributes<HTMLDivElement>

    Prop nameTypeDefaultDescription
    isBold
    boolean

    Applies bold font style

    isMonospace
    boolean

    Renders with monospace font

    tag
    any
    div

    Updates the element's HTML tag

    Paragraph

    Extends HTMLAttributes<HTMLParagraphElement>

    Prop nameTypeDefaultDescription
    size
    'small' | 'medium' | 'large'
    'medium'

    Controls the spacing between sibling paragraphs

    Span

    Extends HTMLAttributes<HTMLSpanElement>

    Prop nameTypeDefaultDescription
    hidden
    boolean

    Hides the span visually without hiding it from screen readers

    hue
    string

    Applies a font color. Use a color variable key (i.e. foreground.subtle) or PALETTE colors when possible. Accepts all hex values.

    isBold
    boolean

    Applies bold font style. Font weight is inherited by default.

    isMonospace
    boolean

    Renders with monospace font

    tag
    any
    span

    Updates the element's HTML tag

    Span.Icon

    Extends SVGAttributes<SVGElement>

    Span.StartIcon

    Extends SVGAttributes<SVGElement>

    Garden is the design system by Zendesk.
    BlogGitHubVersions
    © Zendesk 2025