Skip to main content

DecorationRenderer

Client component (memo) that wraps children with tier-specific decoration chrome (glow, crown, particles) or loading/error fallbacks. Business-agnostic: accepts a decoration id string, not subscription types.

Exports​

  • DecorationVariant — union of known effect ids (enterprise-crown, premium-galaxy, pro-plasma, active-glow, trial-pulse)
  • DecorationConfig — { variant, className?, data-testid? }
  • DecorationRenderer — named export

Props (DecorationRendererProps)​

PropTypeDefaultBehavior
decorationstring | null—When null or while loading, plain wrapper (or scrambler)
childrenReactNode—Content inside effects
classNamestring''Appended to decoration-renderer
isLoadingbooleanfalseShows TextScramblerEffect on extracted child text
errorstring | nullnullWith showError, shows alert icon + title
showErrorbooleanfalseError chrome
data-testidstring—Root data-testid

Behavior​

  • Loading / no decoration: data-loading on root; scrambler uses word-boundary same-character mode at speed 60.
  • Error: decoration-renderer--error + SiteIcon alertTriangle.
  • Decorated: Applies decoration-renderer--{decoration} and variant-specific overlays (SiteIcon crown/star/sparkles/gem for galaxy, glow/pulse layers for others). Content lives in decoration-renderer__content.

Sources: src/app/components/decoration/DecorationRenderer.tsx, src/app/components/decoration/TextScramblerEffect.tsx, src/app/components/decoration/DecorationRenderer.css