Skills scroll-fade-mask
Use this skill whenever the user wants iOS-style scroll fades, gradient masks, scroll-edge overlays, or top/bottom indicators on a scrollable list, dropdown, sidebar, modal, chat log, or panel. It implements a reusable wrapper-based scroll fade mask pattern across React, Vue, Svelte, and vanilla JavaScript, and it is also the right skill when the user says the fade masks broke scrolling, do not show, or do not match the background.
install
source · Clone the upstream repo
git clone https://github.com/stvlynn/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/stvlynn/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/scroll-fade-mask" ~/.claude/skills/stvlynn-skills-scroll-fade-mask && rm -rf "$T"
manifest:
skills/scroll-fade-mask/SKILL.mdsource content
Scroll Fade Mask
Use this skill to implement or troubleshoot gradient fade masks on scrollable containers without breaking scrolling behavior.
What is bundled
- Architecture and CSS system:
references/architecture.md - Framework implementations:
- React:
references/react.md - Vue 3:
references/vue.md - Svelte:
references/svelte.md - Vanilla JS:
references/vanilla-js.md
- React:
- Troubleshooting and debugging checklist:
references/troubleshooting.md - Eval prompts for regression testing:
evals/evals.json
Task mapping
- New implementation: open
plus the framework file for the user's stack.references/architecture.md - Existing component integration: open
and adapt the wrapper around the user's current scroll container.references/architecture.md - Bug report or broken behavior: open
first, then the framework file if behavior code is involved.references/troubleshooting.md
Working rules
- Start from the wrapper pattern in
. Do not improvise with conditional fade divs unless the user explicitly asks for that tradeoff.references/architecture.md - Keep responsibilities split:
- Wrapper owns pseudo-element masks and
state.data-fade-* - Inner element owns
and the actual scrolling.overflow-y: auto
- Wrapper owns pseudo-element masks and
- The wrapper must not become the scroll container by accident. Avoid recommending
oroverflow: hidden
on the wrapper.overflow-y: auto - Match the gradient color to the real background. Use the provided white or warm variants when they fit, otherwise customize the CSS variable.
- For framework implementations, prefer a reusable primitive:
- React hook
- Vue composable
- Svelte action
- Vanilla JS class
- Include
when you provide behavior code so the masks react to dynamic content changes.ResizeObserver - For troubleshooting, diagnose layout and overflow first, then refs/listeners, then z-index/background issues.
- Respond in the user's language unless the surrounding codebase clearly suggests otherwise.
Default workflow
- Identify the task type: implementation, integration into existing markup, or troubleshooting.
- Open
first.references/architecture.md - Open the smallest relevant framework file for the user's stack.
- If the user reports a bug, also open
.references/troubleshooting.md - Return adapted code, not a generic dump:
- CSS system
- behavior primitive for their stack
- integration example using their container shape
- brief notes on why the wrapper pattern matters
Routing shortcuts
- Global CSS and class variants:
references/architecture.md - React hook + JSX usage:
references/react.md - Vue 3 composable + template usage:
references/vue.md - Svelte action + state wiring:
references/svelte.md - Framework-free implementation:
references/vanilla-js.md - "Can't scroll", masks not showing, wrong edge state:
references/troubleshooting.md
Output expectations
- Implementation requests should include the wrapper markup, the scroll container contract, and the behavior code for the user's stack.
- Troubleshooting requests should clearly identify the likely root cause before presenting the fix.
- When the user gives a background color, incorporate it into the recommended gradient setup.
- Keep code production-oriented: reusable helpers, no brittle inline scroll logic unless the user asks for the fastest possible one-off patch.