Files
zeekay d954227524 feat: Lux Design System — tokens, components, brand assets, guidelines
Monochrome, dark by default. One hue rendered through an opacity ladder.
Tokens (color, type, spacing, radius, elevation, motion) + core/forms/navigation/
overlays components + brand guidelines + ui kit. The single source of truth for
every Lux surface — loadable and editable.
2026-07-24 17:21:07 -07:00

30 lines
1.1 KiB
React

import React from 'react'
/** The canonical Lux headline treatment: white → white/60 chrome gradient,
* clipped to the text. Never a saturated or rainbow gradient. */
export function ChromeText({ as = 'span', tone = 'chrome', preHeading, preHeadingStyle, style, children, ...rest }) {
const Tag = as
const gradient = tone === 'deep' ? 'var(--gradient-chrome-2)' : 'var(--gradient-chrome)'
const node = (
<Tag
style={{
backgroundImage:gradient,
WebkitBackgroundClip:'text',backgroundClip:'text',
WebkitTextFillColor:'transparent',color:'transparent',
display:'inline-block',
...style,
}}
{...rest}
>
{children}
</Tag>
)
if (!preHeading) return node
return (
<span style={{display:'flex',flexDirection:'column',gap:12,alignItems:'inherit'}}>
<span style={{fontSize:'var(--text-xs)',fontWeight:'var(--weight-semibold)',textTransform:'uppercase',letterSpacing:'var(--tracking-widest)',color:'var(--text-helper)',...preHeadingStyle}}>{preHeading}</span>
{node}
</span>
)
}