Skip to main content

Documentation 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.

Principles

Purpose

In the user interface, color carries specific meaning and sets consistent user expectations. Use red, green, and yellow to provide status feedback such as success, warning, or danger. Limit their application to avoid visual clutter. Use blue to emphasize interactive elements.
  • Use the appropriate hue to communicate function.
  • Do not use a hue that is misaligned with the expected action.

Hierarchy

Color is a powerful tool for presenting the hierarchy of elements on a screen. It helps highlight key elements that require interaction and de-emphasize secondary ones. Primary color (blue) is dedicated to buttons, links, and selection states. Neutral shades (grey) are commonly used for non-interactive foregrounds, backgrounds, and borders — except in validation cases. This distinction helps users easily understand which areas on the screen are responsible for completing a task. Supplement colors with text and icons to reinforce hierarchy and relevance.
  • Draw the user’s attention only to what is important for achieving their goals.
  • Do not use color to decorate or to distract.

Elevation

A common practice is to communicate element hierarchy through levels. Garden uses color, shadows, backdrops, borders, and fills to present the spatial relationships between elements.
DepthUsage
recessedSurfaces that sit below the main surface (e.g., Well)
defaultMain background surfaces
subtleSurfaces positioned on the main surface that need emphasis (e.g., Alert)
raisedSurfaces floating above the main surface (e.g., Modal, Tooltip dialog, Notification)
  • Use color to communicate depth.
  • Do not add shadow to elements that should not be elevated.

Opacity

Colors with opacity applied help visually indicate layering of elements on different backgrounds. Opacity is primarily used for background colors and follows predefined values. Interactive elements such as basic buttons and tables are good examples where opacity can be applied.
  • Use opacity to layer colors together.
  • Do not apply opacity in a way that makes other elements unusable.

Accessibility

Do not rely solely on color to indicate the state or status of a component. Use text or icons to support the visual affordance. The most effective measure of color accessibility is the contrast ratio, as regulated by WCAG 2.1 guidelines.
Element typeMinimum contrast ratio
Text4.5:1
Graphical elements (icons, borders)3:1
Never use color alone to indicate state or status. Always pair color changes with a text label or icon so that the meaning is accessible to users with color vision impairment.

Variables

Primitive and semantic variables

Garden distinguishes two levels of color variables that serve distinct but complementary purposes. Primitive variables represent the option level — the most fundamental values in the design system. Their names describe visual attributes or represent basic palette values (for example, red-500 or blue-100). They are the source for higher-level variables and are not applied directly to components. Semantic variables are built on top of primitive variables and represent the context level. Their names are descriptive and carry intended use or meaning rather than appearance (for example, border.warning). Garden uses semantic variables in components as the only variables that support theming.

Taxonomy

Variable names are composed from parts that move from generic to specific:
Application → Group → Element → Modifier → State
  • Application — the type of variable (color)
  • Group — whether the variable belongs to an object group (chrome or tag)
  • Element — where the variable is applied (background, foreground, or border)
  • Modifier — variant or prominence (primary, default, or emphasis)
  • State — interaction state (hover or active)
Variable exampleDescription
color.border.success.emphasisStrong success border color applied to Input
color.chrome.foreground.defaultDefault text color applied in a Chrome component
color.background.primary.hoverHover background color applied to a Primary button
Always aim to simplify variable names and avoid overspecification. Use camelCase or . notation when stitching parts together to separate categories.

Semantic variable categories

Garden’s semantic color variables are grouped into four main categories.

Foreground

Foreground variables apply to text and icons.
ModifierUse
foreground.defaultPrimary text color for body content
foreground.subtleDe-emphasized text, placeholders, disabled labels
foreground.emphasisStrongly emphasized text
foreground.primaryInteractive text such as links and active selections
foreground.successSuccess state text and icons
foreground.warningWarning state text and icons
foreground.dangerDanger or error state text and icons
foreground.onEmphasisText on filled/emphasis backgrounds (typically white)

Background

Background variables apply to fill areas.
ModifierUse
background.defaultMain page or panel background
background.recessedSurfaces below the main surface (e.g., Well)
background.subtleSurfaces slightly above the main surface (e.g., Alert)
background.raisedFloating surfaces (e.g., Modal, Menu)
background.primaryFilled interactive element background (e.g., Primary button)
background.successSuccess state fill
background.warningWarning state fill
background.dangerDanger state fill

Border

Border variables apply to interactive and non-interactive borders.
ModifierUse
border.defaultStandard borders on inputs and containers
border.subtleLow-emphasis dividers and separators
border.emphasisHigh-contrast or active focus borders
border.successSuccess validation border
border.warningWarning validation border
border.dangerError validation border

Shadows

Shadow variables apply to elevation. In light mode, raised surfaces cast outward shadows. In dark mode, raised surfaces use a lighter tint.
Shadow sizeUsed for
SmallTooltip only
MediumComponents without backdrop (Tooltip dialog, Menu)
LargeComponents with a backdrop (Modal, Drawer)

Theming

Light mode vs. dark mode

AspectLight modeDark mode
Prevailing shade for actionable elementsShade 700Shade 600
SaturationFullSlightly reduced (less light bleed)
Hover interaction directionIncreases shade (darker)Decreases shade (lighter)
Filled element textDark on light fillDark on light fill (same)

Elevation in each mode

In light mode, default and raised surfaces are lighter than recessed and subtle surfaces. In dark mode, surfaces closer to the light source use a lighter tint; recessed surfaces that are further from the light source use a darker shade. In both modes, raised surfaces cast a shadow.

Opacity

Opacity values are consistent in both light and dark mode. Light mode uses shade 700 and dark mode uses shade 500 as the primary shade for opacity-based colors.
Hover and active states programmatically change color by a 100 or 200 shade offset from the base hue. This is handled automatically by the Garden theme — you do not need to define hover/active values manually.

Build docs developers (and LLMs) love