No.506 · Type & Names
Chapter Numeral
A giant outlined numeral that fills from the bottom like a rising liquid level as it scrolls into view, with the name set on its baseline.
The prompt
Written for the variant you picked above: Cyan
Set a two-digit numeral in Anton at clamp(9–20rem), drawn twice: an outline copy (1.5px text-stroke, 70% accent) and a solid accent copy stacked on top, clipped with inset(100% 0 0 0). When the block passes 50% visibility, transition the clip to inset(0) over 2.2s on an ease-in-out — the numeral fills like a level of liquid, darkening slightly toward the bottom via a multiply gradient. Place the person's name (italic serif) and role (mono) at the baseline with mix-blend-mode: difference so text stays legible across filled and empty regions. Selected variant — Cyan (cyan): color="#5fd6e8" (cyan), number "03"; name "Hamza Al-Bulushi", role "Software Engineer". This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Fills as it scrolls into view and drains as it leaves. Motion: 2.2s clip-path inset transition on the fill layer. Accessibility: Digits are decorative (aria-hidden); the figcaption carries name and role. Reduced motion shows the filled numeral. Responsive behavior: Numeral size uses clamp(); the caption sits on the baseline on one line, so on a phone a long name runs past the numeral instead of wrapping into it. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Fills as it scrolls into view and drains as it leaves.
- Motion
- 2.2s clip-path inset transition on the fill layer.
- Accessibility
- Digits are decorative (aria-hidden); the figcaption carries name and role. Reduced motion shows the filled numeral.
- Responsive
- Numeral size uses clamp(); the caption sits on the baseline on one line, so on a phone a long name runs past the numeral instead of wrapping into it.