feat(registry): add vignette CSS component#825
Closed
calcarazgre646 wants to merge 1 commit into
Closed
Conversation
Pure-CSS radial darkening overlay that fills its positioned parent and pulls focus toward the center. Shape, size, and color are exposed as CSS custom properties (--vignette-shape, --vignette-size, --vignette-edge, --vignette-color), so a GSAP timeline can animate any of them — the snippet's header comment shows the pattern for fading the vignette in. The Components section currently has four entries; this fills the cinematic-cinematography gap a video editor expects out of the box without bundling any asset (the effect is a single radial-gradient). Default z-index 90 sits below grain-overlay (100) so grain reads on top of the darkened corners. Catalog page, registry index, and nav are regenerated via scripts/generate-catalog-pages.ts.
db73655 to
153278f
Compare
miguel-heygen
approved these changes
May 14, 2026
5 tasks
Collaborator
|
Thanks @calcarazgre646 — really nice addition. Our catalog additions need to land via a team member, and the CI failure here is actually a pre-existing regression in our preview script (it still passes I've taken over in #843 — your component commit is preserved with full authorship credit, and I added a one-commit fix for the rational-fps regression on top. Will close this once #843 lands. 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
vignette— a pure-CSS radial darkening overlay — to the components catalog. It absolutely fills its positioned parent withpointer-events: none, so it sits over any composition without intercepting interaction, and uses a singleradial-gradientto pull focus toward the center.The intent matches the bar set in #779 and the team discussion on #712: a small, generic, model-free primitive in the spirit of a shadcn-style component. No bundled assets, no Three.js, no hardcoded theme.
Why this fills a real gap
Components currently has four entries (
grain-overlay,shimmer-sweep,grid-pixelate-wipe,texture-mask-text). None covers the cinematic edge-darken that virtually every cinematographic edit reaches for. With this component a user can do:…and get a configurable cinematic vignette in two lines.
API
Customizable via CSS custom properties on
#hf-vignette(or any ancestor):--vignette-colorrgba(0, 0, 0, 0.7)--vignette-size45%--vignette-edge100%--vignette-shapeellipseellipse|circleAll four properties can be tweened from a GSAP timeline; the snippet's header comment shows the standard "fade-in over 1s" pattern. Default
z-index: 90sits belowgrain-overlay(100) so grain reads on top of the darkened corners — inline-overridable if a different layer order is needed.Files
registry/components/vignette/registry-item.json— manifestregistry/components/vignette/vignette.html— the snippet (~50 lines incl. the documentation comment)registry/components/vignette/demo.html— standalone composition that fades the vignette in, then breathes the--vignette-sizeonceregistry/registry.json— index entrydocs/catalog/components/vignette.mdx,docs/docs.json,docs/public/catalog-index.json— regenerated viascripts/generate-catalog-pages.tsTest plan
npx tsx scripts/generate-catalog-previews.ts --only vignette --skip-video→ renders cleanly (564 ms), 1920×1080 PNG matches the intent.npx tsx scripts/generate-catalog-pages.ts→ produces the MDX page, updatesdocs.jsonandcatalog-index.jsonwith no other diffs.npx hyperframes lintagainst a temp project that includes the snippet → 0 errors, 0 snippet-side warnings.npx hyperframes validateagainst the same project → "No console errors · 5 text elements pass WCAG AA".cd docs && npx mint validate→ build validation passed.cd docs && npx mint broken-links→ no broken links.npx tsx scripts/sync-schemas.ts --check→ registry + registry-item schemas in sync.Happy to adjust the API surface (rename properties, drop a knob, reframe the default z-index) or the demo timing if the team wants something different.