saturation/uisaturation/ui
DocsComponentsBlocksPagesEmails
GitHub

Sections

IntroductionComponentsInstallationMCPThemingDesign

Components

Components

General

AvatarBadgeButtonKbdProgressSeparatorSkeletonSpin ResolveSpinnerSync ButtonTypography

Forms & Inputs

Address LookupCalendar PickerCheckboxComboboxDate PickerEmoji PickerFavicon SearchFieldInputInput GroupInput OTPRadio GroupSelectSliderSwitchTextareaToggleToggle Group

Data Display

AccordionAlertCardChartComparison SliderCredit CardData TableEmptyItemSaturation Credit CardTableTree

Navigation

BreadcrumbCommandMenubarNavigation MenuPaginationTabs

Overlays

CollapsibleContext MenuDialogDropdown MenuSheet

Layout

Button GroupFont ProviderWizard Split Layout

Feedback

Sonner

Animation & Effects

Animated GroupAnimated ListAnimated NumberBeamBlur FadeBorder TrailGlow EffectLiquid MetalLoading StateParallaxPixelProgressive BlurRippleSpotlightText EffectText Shimmer

Productivity

Agent ChatAI Chat InputCoding AgentFiltersFull CalendarKanbanNovel Editor
Docs/Components/Font Provider

Font Provider

Swappable font-token layer. Wrap a subtree to scope --font-sans, --font-mono, --font-display, and --font-feature-settings via CSS-variable cascade. Distinct from the Typography primitives (T1-T4, P, etc.) — FontProvider controls *which* font those primitives render in.

Loading...

Installation

pnpm dlx shadcn@latest add @saturation-ui/font-provider

Tailwind v4 — Source Scanning

The public shadcn registry installs component source into your project. If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:

@source "../components";

This ensures all utility classes in CVA variants and data attribute selectors are included in your build.

Usage

import { FontProvider } from "@/components/ui/font-provider"
<FontProvider preset="next">
  <App />
</FontProvider>

Nesting

FontProvider scopes its tokens to its subtree via CSS-variable cascade. Wrap nested subtrees in a different preset to override:

<FontProvider preset="next">
  <App />
  <FontProvider preset="gellix">
    <MarketingHero />
  </FontProvider>
</FontProvider>

Reading the current preset

import { useFont } from "@/components/ui/font-provider"

function MyComponent() {
  const { preset, tokens } = useFont()
  return <span>Active preset: {preset}</span>
}

API Reference

PropTypeDefaultDescription
preset"next" | "gellix""next"Named preset to apply. `next` uses the system-font stack; `gellix` uses the Gellix typeface with ss01/cv01 OpenType features.
tokens{ fontSans?: string; fontMono?: string; fontDisplay?: string; fontFeatureSettings?: string }—Fine-grained token overrides merged on top of the preset.
asChildbooleanfalseRender styles on a passed child instead of wrapping in an extra <div>. Uses Radix Slot.
PreviousFiltersNextFull Calendar

On This Page

  • Installation
  • Usage
  • Nesting
  • Reading the current preset
  • API Reference
preset="next" (default)

The system stack

Body text renders in the OS system font: San Francisco on macOS, Segoe UI on Windows, Roboto on Android.

preset="gellix"

The Gellix preset

Body text renders in Gellix with OpenType features ss01 and cv01 enabled.