Skip to content
Development
Skill

/scroll-areas

Avoid inner scroll containers; when unavoidable, one axis at a time. Use when a layout, table or panel might scroll inside the page.

From plugin
dembrandt
18045 skills1 MCP

Claude Code

$ npx -y skills add dembrandt/dembrandt-skills --skill scroll-areas --agent claude-code

SKILL.md

scroll-areas.SKILL.md
name: scroll-areas
description: Avoid inner scroll containers; when unavoidable, one axis at a time. Use when a layout, table or panel might scroll inside the page.
metadata:
  priority: 7
  pathPatterns:
    - "**/*.css"
    - "**/*.scss"
    - "components/**"
    - "src/components/**"
    - "**/*.tsx"
    - "**/*.jsx"
    - "design-system/**"
  promptSignals:
    phrases:
      - "scroll"
      - "overflow"
      - "scrollable"
      - "inner scroll"
      - "fixed height"
      - "overflow-y"
      - "overflow-x"
retrieval:
  aliases:
    - scroll areas
    - inner scroll
    - overflow scroll
    - nested scroll
    - scrollable container
  intents:
    - avoid scroll inside scroll
    - design a scrollable list
    - handle overflow content
    - layout with constrained height
  examples:
    - should this panel scroll independently
    - how do I handle a long list inside a fixed layout
    - avoid scroll inside scroll

Scroll Areas

Avoid Scroll Areas by Default

Scroll containers inside a layout — panels, drawers, tables, modals with inner overflow — create friction. Users must discover that a region scrolls, manage multiple independent scroll positions simultaneously, and context-switch between scroll areas on the same screen.

**Default: let the page scroll.** A single page-level scroll is universally understood and requires no discovery. Before introducing an inner scroll area, ask whether the layout can be restructured so the page itself handles the overflow.

Alternatives to inner scroll:

  • Pagination or load-more for long lists
  • Collapsible sections (accordion) for long detail panels
  • A separate page or route for content that would otherwise fill a scroll area
  • Progressive disclosure — show less by default, expand on demand

When a Scroll Area Is Justified

Some layouts genuinely require inner scroll:

  • **Fixed-height sidebars** with navigation trees longer than the viewport
  • **Data tables** where the header must remain visible while rows scroll
  • **Chat or log panels** where the stream is continuous and the surrounding layout is fixed
  • **Code editors or terminal panes** embedded in a larger application shell

In these cases, proceed — but apply the constraints below.

One Axis Only

Never create a scroll container that scrolls on both axes simultaneously. Two-axis scroll is disorienting, hard to control precisely, and nearly unusable on touch devices.

/* One axis: vertical */
overflow-y: auto;
overflow-x: hidden;

/* One axis: horizontal (e.g. wide table) */
overflow-x: auto;
overflow-y: hidden;

/* Never */
overflow: auto; /* allows both axes */

If content requires both axes — e.g. a wide table inside a constrained panel — restructure the layout so the table's horizontal scroll is the only scroll in the view, with the page itself not scrolling at that point.

Always User-Controlled

Scroll must never happen automatically without user intent. Specifically:

  • **No auto-scrolling** that moves the viewport without the user initiating it
  • **No scroll hijacking** — do not intercept the native scroll event to animate or pace it artificially
  • **Scroll-to on load** is acceptable only when restoring a previous scroll position (e.g. returning to a list after navigating away)
  • **Scroll-to for errors or anchors** is acceptable as a response to a user action (submitting a form with errors, clicking a table-of-contents link)

Exception: chat and log panels may auto-scroll to the bottom on new content, but only if the user is already at the bottom. If the user has scrolled up to read, do not force them back down — show a "new messages" indicator instead.

Scroll Affordance

Users must be able to tell a region is scrollable before they attempt to scroll it.

  • Clip content visually at the edge — a partially visible item signals "there is more"
  • Use a subtle scrollbar (not `scrollbar-width: none`) so the track is visible
  • On touch, a partial item at the edge is the primary affordance — ensure the container does not have `overflow: hidden` on the trailing edge

Neither cue is reliable: overlay scrollbars (macOS, touch) appear only while scrolling, and a clipped item signals more only when the cut lands mid-item. **Give every nested scroll region an edge cue**: a shadow or fade shown only at an edge with hidden content. Gradients with `background-attachment: local` over shadows with `scroll` do this in pure CSS, but opaque row backgrounds cover them; there, fade the content with `mask-image`.

Review Checklist

  • [ ] Is every inner scroll area genuinely necessary, or can the layout be restructured to use page scroll?
  • [ ] Does every scroll container scroll on one axis only?
  • [ ] Is `overflow: auto` (two-axis) avoided on all scroll containers?
  • [ ] Is scroll always user-initiated — no hijacking, no forced auto-scroll?
  • [ ] Is the scrollable region visually apparent (partial content, visible scrollbar)?
  • [ ] Does each nested scroll region show a shadow or fade at an edge only while content is hidden behind it?
  • [ ] On touch devices, does scroll use native momentum, with no JS scroll emulation?
Read more
@dembrandt
Ships withdembrandt

Enterprise UX secrets, now built into your AI agent. Your agent writes the component in seconds. It does not know the modal should be a drawer, or that the grey it picked fails contrast. These skills carry that judgment: what to do, and what breaks otherwise.

18045 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
180
Star history of dembrandt/dembrandt-skills on GitHub, a chart by star-history.com

Other skills on dembrandt.

app-shell

app-shell

Top bar, sidebar rail, app launcher, tenant and environment cue, status bar. Use when designing the persistent shell, a…

@dembrandt@dembrandtInstall Skill
brand-visual-language

brand-visual-language

Shape language across type, radius and icons carries brand personality. Use when starting a design system, picking icons or…

@dembrandt@dembrandtInstall Skill
button-states

button-states

Rest, hover, active, focus, disabled and loading states, derived from the base colour. Use when designing buttons, links, inputs…

@dembrandt@dembrandtInstall Skill
clone-website

clone-website

Rebuild a live web page 1:1 from measurement into Figma, Penpot or code, then verify it. Use when reproducing a page or checking…

@dembrandt@dembrandtInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about scroll-areas.

Which coding agents can use scroll-areas?
scroll-areas installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.