Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Gradient Text

Fills inline text with one of four gradients or your own CSS gradient.

ComponentsGradient Text
typographystatic
<arc-gradient-text>

Overview

GradientText fills inline text with a gradient using `background-clip: text`. Pick a `variant`: `accent` (the default, `--gradient-accent-text`), `display` (`--gradient-display-text`), `sunset` or `ocean`. For your own gradient, set `variant="custom"` and pass any CSS gradient in `gradient`. `gradient` is ignored with the other variants. It's inline and inherits the parent's font size, weight and line height, so it works inside a heading, a paragraph or a button label. Every variant adds a faint drop-shadow glow in `--accent-primary-rgb`. The paint box extends a little above and below the text so descenders aren't clipped under a tight line height. `animated` slides the gradient back and forth on a 4-second loop, and stops under reduced motion. It has no visible effect with `variant="custom"`.

Guidelines

Do

  • Use it for hero headings, feature labels and marketing copy
  • Use it at 24px and up, where the gradient is easy to see
  • Use `accent` where the text should match the brand colors, and `display` for page headings and section titles
  • Use `custom` for one-off or campaign colors

Don't

  • Don't use it for body copy or long paragraphs. At small sizes the gradient is hard to see
  • Don't animate every gradient on the page. Animate one focal element at most
  • Don't use `sunset` or `ocean` where the text has to match the brand accent tokens

Features

  • `accent` and `display` read theme tokens, so they follow theme overrides
  • CSS part: `text`

Preview

Accent gradient Display gradient Sunset gradient Ocean gradient Animated gradient

Usage

Gradient Text is in the marketing group, so the default @arclux/arc-ui entry point doesn't include it. Import it from@arclux/arc-ui/marketing or from its own subpath,@arclux/arc-ui/gradient-text.

<arc-gradient-text variant="accent">Accent Gradient</arc-gradient-text>

<!-- Display heading gradient -->
<arc-gradient-text variant="display">Display Gradient</arc-gradient-text>

<!-- Sunset variant -->
<arc-gradient-text variant="sunset">Sunset Gradient</arc-gradient-text>

<!-- Ocean variant -->
<arc-gradient-text variant="ocean">Ocean Gradient</arc-gradient-text>

<!-- Custom gradient -->
<arc-gradient-text variant="custom" gradient="linear-gradient(90deg, #e66465, #9198e5)">
  Custom Gradient
</arc-gradient-text>

<!-- Animated -->
<arc-gradient-text variant="accent" animated>Animated Gradient</arc-gradient-text>

API

gradientstring''
Custom CSS gradient string, used when variant is set to custom
variant'accent' | 'display' | 'sunset' | 'ocean' | 'custom''accent'
Predefined gradient variant to apply
animatedbooleanfalse
Animate the gradient with a shifting background-position cycle

See also