How Glimm Works
Creator Noman presents Glimm as an alternative to conventional celebration visuals like confetti. The library renders a shader-driven band across the screen during route transitions or custom state updates, smoothly displaying the new interface underneath. Setup requires wrapping children in <GlimmProvider> at the root. Navigation can then be triggered via <TransitionLink>, the useTransitionRouter() hook for programmatic redirects, or <InterceptLinks /> for blanket internal link handling.
Customisation and Version 0.4 Features
Transitions can be adjusted through props governing band width (bandTight), duration (sweepMs), direction, and route swap timings (midpoint). Palettes use cosine color formulas that can be generated or selected from seven presets.
Key capabilities introduced in version 0.4 include:
- HTML-in-Canvas support: Allows the shader to interact directly with page content inside Chrome.
- GlimmScope: Restricts the sweep effect to a specific card or section rather than the whole screen.
- Agent Skill: Provides automated setup via
npx skills add nomanjack/glimm-skill (Node 22.20+).
Recommended Best Practices
The documentation advises against firing sweeps on every navigation or treating them as replacement spinners for skeleton loading states. Frequent triggers diminish the visual impact. Glimm is best reserved for significant actions, such as completed submissions, checkout flows, or major section transitions.