effects
Skill11 starsChanged 6 days agoMITView on GitHub
Applying @bydiorama/ui's effects layer — glass, grain, sheen, glow, shimmer, ink, and the optional shaders: the parametric gradient ground and halo — to components in a consumer app. Use when someone asks for glass or frosted panels, grain or texture, a shine or sweep on a button, a glow, shimmering status text, gradient headings, an animated gradient or WebGL background, a hero or empty-state ground, a halo while something loads, "make it feel premium", or when adding shaders, WebGL or liquid glass to a Diorama UI.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- kavitarak/ai-video-skillstheir own version, first seen Nov 22, 2026
- aitjb/aitjb-reel-effectstheir own version, first seen Nov 22, 2026
- Vibha-Ramprakash/claude-video-effectstheir own version, first seen Nov 1, 2026
- dongnguyenvie/bashcut-agent-kittheir own version, first seen Oct 13, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Vibha-Ramprakash/claude-video-effects★ 1.3ksame name
- dongnguyenvie/bashcut-agent-kit★ 6same name
- aitjb/aitjb-reel-effects★ 0same name
- kavitarak/ai-video-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-componentSkill
- app-motionSkill
- craftSkill
- create-skillSkill
- demo-pageSkill
- design-componentSkill
- motion-componentSkill
- motion-mediaSkill
- review-uiSkill
- static-renderingSkill
- stills-renderSkill
- video-renderSkill
- visual-reviewSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Never add a prop to a component for an effect, and never style its inner parts yourself: the stylesheet reaches the part through data-slot.
- Very specific: line 44
Keep it after Tailwind and outside any @layer of your own: effects live in @layer fx, ordered after utilities.
- Distinctive: line 110
The floor: No WebGL, before hydration, on the server: every component renders exactly as without the effect.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Effects on @bydiorama/ui
The effects layer (ADR 0022 in bydiorama/ui) is materials, light and ambient
motion laid over components that are already finished. Two registry items:
| Item | What | Cost |
fx | fx() helper + one stylesheet per CSS effect | CSS only. Works before hydration, in every engine, statically rendered |
shader | gradient (one parametric ground), halo, and startShaders() | One WebGL2 context, a client script. Optional — install only for these |
Apply an effect: a class on the root, nothing else
import { fx } from "@/lib/fx";
<Card className={fx("glass", "edge", "specular")}>…</Card>
<Button className={fx("sheen", "grain")}>Publish</Button>
<p className={fx("shimmer")}>Generating…</p>
<section className={fx("opaque")}>…glass inside stands down…</section>
<section className={fx("gradient")}>…a moving ground, glass on top…</section>
<section className={fx("gradient")} style={{ "--ui-fx-gradient-look": "rise" }}>…a horizon…</section>Never add a prop to a component for an effect, and never style its inner
parts yourself: the stylesheet reaches the part through data-slot. If an
effect does nothing on a component, it is not listed for it — check EFFECTS
in lib/fx.ts, which says what every effect is for and where it
applies. Writing it anyway renders the plain component.
Setup, once, after Tailwind and the theme:
@import "tailwindcss";
@import "./theme-zero.css"; /* or the brand's emitted theme */
@import "./fx/fx.css";
@import "./fx/shader.css"; /* only with the shader item */Keep it after Tailwind and outside any @layer of your own: effects
live in @layer fx, ordered after utilities. Your unlayered CSS still wins
over an effect — that is deliberate.
Shaders, once, in a client component at the root (or a <script> in Astro):
useEffect(() => startShaders(), []); // returns its own stop; StrictMode-safeChoose by job, not by look
| You want | Use | Not |
| A panel over a photo, a video or a moving ground | glass (+ edge, inner, specular) | glass over a flat page — it is only a tint there |
| One material across a view: the nav, the cards, the menu opened over them | glass on each — the component picks its own thickness | choosing a "thinner" or "thicker" glass yourself: there is no such knob |
| Glass off for one dense region — a billing table, a slow embed | opaque on the region | removing glass from each part inside, or overriding the fill by hand |
| A flat fill to read as a material | grain | grain on an unfilled control: it shows as grey haze |
| Mark a moment — saved, value reached | sheen + sweep(el) once | a sweep on hover, or on a loop |
| A control that is ON to read as lit | glow | glow as a focus indicator |
| "Working…" while an agent runs | shimmer on the status text; halo on the busy Button | a spinner beside a shimmer — one signal |
| A hero heading with presence | ink | ink on body copy |
| A moving ground: an empty state, a sign-in, a hero, a panel behind glass | gradient on the section; pick the look with --ui-fx-gradient-look | a ground behind dense UI; more than one per view; a ground on a control (grounds are sections only) |
Choosing the look — one effect, one token; every other knob is shared:
| Look | Reads as | Good for |
wash (default) | a calm field of colour that fills the frame | empty states, sign-in, a panel behind glass |
sweep | two big forms lit across their bodies, one strong curve | a hero, a feature band |
fold | light panes with crisp lit rims | a launch moment, a marketing band |
rise | a horizon: a crisp bright rim low in the frame, copy in the sky | a landing hero, a "welcome" screen |
dawn | a soft horizon: light rising from below the frame, no rim, copy in the sky | a sign-in, a calm landing, an onboarding step |
Set only what you mean to change. Four knobs follow the look when left at
auto: angle, intensity, and the quiet zone's size and height. So look:
rise alone is a finished horizon with its copy top left. The other knobs
have one default for every look.
Set the knobs anywhere above the ground: on the section, a wrapper or a
brand scope — they inherit. The colours default to the scope's own
--ui-bg-base and --ui-bg-accent, so a brand scope needs no gradient
tokens at all. Write numbers as CSS would: 24deg, 0.1turn, 25%.
calc() is not evaluated in a custom property and reads as the default
(with a console warning); out-of-range values are clamped.
What the layer guarantees — do not re-solve it
- Contrast. Glass paints a tint the resolver derives per brand so the
inks clear 4.5:1 over anything behind it. Do not lower its opacity
"for more glass"; re-emit the theme instead if the brand changed. A
ground keeps a quiet zone of its exact base around its copy (bottom
left by default), so the ink keeps its audited contrast — put the copy
there, or move the zone to the copy (
--ui-fx-gradient-quiet-x/-y). - Thickness by role. Sidebar and NavRail are the quietest pane
(
--ui-nav-bg-glass, derived from the nav's own colours, 12px blur, no lit top edge); Card, Badge and unfilled Buttons are as before; Popover and Menu are the thickest (--ui-bg-glass-overlay, 32px blur, lit along the top), because they open over what the reader was in. No tier is thinner than--ui-bg-glass. Select, Combobox, Tooltip, Modal, Sheet and Drawer take no glass. - Accessibility. Reduced transparency, or
fx("opaque")on an ancestor or the part itself → the component's own opaque fill; the edge light stays. Any motion level belowfull(the OS preference, ordata-ui-motionon the element or an ancestor) → no ambient animation, one still shader frame,sweep()plays nothing. Forced colours → the plain component. You add nothing. - The floor. No WebGL, before hydration, on the server: every component renders exactly as without the effect.
Tuning
Override tokens on a scope, like any component variable:
| Token | Default | Moves |
--ui-fx-glass-blur / -blur-control | 24px / 12px | backdrop blur on surfaces / controls |
--ui-fx-glass-blur-frame / -blur-overlay | 12px / 32px | backdrop blur on Sidebar and NavRail / Popover and Menu |
--ui-fx-grain + --ui-fx-grain-amount | subtle tile, 0.03 | var(--ui-fx-grain-visible), 0.07 for a grainier brand |
--ui-fx-ambient-speed | 1 | 0.5 calm, 1.7 expressive — the grounds, ink, shimmer |
--ui-fx-gradient-look | wash | wash · sweep · fold · rise · dawn |
--ui-fx-gradient-base / -light | the scope's --ui-bg-base / --ui-bg-accent | the gradient's two colours; every other tone is derived from them |
--ui-fx-gradient-angle | auto | the direction the forms run (deg, turn, rad) |
--ui-fx-gradient-sharpness | 0.5 | 0 soft … 1 crisp edges and rims |
--ui-fx-gradient-scale | 1 | the forms' size: 0.6 tight, 1.6 broad |
--ui-fx-gradient-chroma | 1 | colourfulness: 0.6 quiet, 1.4 vivid |
--ui-fx-gradient-intensity | auto | how far the field leaves the base: 0.5 is a hint |
--ui-fx-gradient-quiet + -quiet-x / -quiet-y | auto (0.42; 0.3 for the horizons) at 0.16, auto | the quiet zone's radius (a fraction of the width; 0 = none, copy on glass) and centre (0..1 from the top left) — put it where the copy is |
--ui-fx-gradient-dissolve | 0 | 0.15–0.25 melts the ground's edge into the page |
Never tune --ui-fx-glass-wash, -grade or -bloom up in dark: that
light sits under text, and the resolver's floor counts exactly the current
amount.
Traps already paid for
| Trap | Rule |
| "Liquid glass that bends the content behind it" | Not possible on the web stack outside Chromium: a canvas cannot read the page. Two shader versions were built and removed. Use glass |
| A halo cut flat on one side | It reaches 22px outside its part; an overflow: hidden ancestor clips it. Give it room |
| Sheen on a pale brand accent | White light lifts a pale fill toward white and it reads disabled. Sheen wants a mid-to-dark fill |
| A glass card in a theme emitted before glass existed | Falls back to the opaque surface. Re-emit the theme to get --ui-bg-glass |
| A glass nav or menu in a theme emitted before 2026-11-20 | The nav falls back to the opaque nav, the menu and popover to the opaque surface. Re-emit the theme to get --ui-nav-bg-glass and --ui-bg-glass-overlay |
fx("opaque") around a menu that stays glass | Popover and Menu portal to the body, out of the region. Put fx("opaque") on the panel itself, or portal it into the region with container |
| Copy wider than the quiet zone on a narrow ground | The zone is a fraction of the ground's width; copy is fixed in px. Below ~900px wide, raise --ui-fx-gradient-quiet (0.6 holds a 440px block on a 600px ground) or put the copy on glass |
| Copy on a ground, outside its quiet zone | The ground is free to be bright there; nothing keeps that text legible. Move the zone (--ui-fx-gradient-quiet-x / -y) to the copy, or the copy into the zone — or set the zone to 0 and put the copy on glass |
| Changing the look by swapping classes | There is one class. Change --ui-fx-gradient-look; the same canvas redraws in the new look |
fx("aurora") in an app | Retired 2026-11-22 (ADR 0025). On a ground use fx("gradient"); on a control, sheen, grain or glow |
| Clipping a shader canvas with CSS | iOS Safari drops the clip while it animates. The shader draws its own shape; never add overflow/border-radius hacks to the canvas |
| Judging an effect in headless Chromium | The worst defects of this layer only showed on an iPhone. Look on a device, both schemes |
| Everything carries an effect | An effect is emphasis; emphasis everywhere is none. One glass surface and one lit action per view is plenty |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

