Skip to main content
skill CX Codex

scroll-areas — Claude Code skill: what it does, how to install

Teaches coding agents to avoid inner scroll containers and restricts unavoidable scroll areas to a single axis in UI layouts.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dembrandt/dembrandt-skills --skill scroll-areas -a claude-code
Open on GitHub

What scroll-areas does

This skill provides a layout policy for styling and component files. It instructs the assistant to favor standard page-level scrolling over isolated scrollable panels or modal windows. For overflowing content, the agent suggests alternatives like pagination, collapsible accordions, or separate routes.

When an inner scroll container is necessary—such as a fixed sidebar or a wide data table—the rule strictly enforces single-axis movement. It prohibits overflow: auto because two-axis scrolling breaks touch navigation. The container must declare overflow-y: auto with overflow-x: hidden, or the inverse. It also stops scroll hijacking and requires visible scroll indicators rather than hiding them with scrollbar-width: none.

The skill relies on matching layout paths like components/** and explicit scroll-related prompt phrases to trigger these constraints.

What it helps with

  • prevent nested inner scrollbars across application screens
  • restrict table and panel scrolling strictly to one axis
  • stop scroll hijacking and unrequested viewport jumps
  • keep scroll indicators visible without hiding native scrollbars

Example prompts for the agent

  • Build a sidebar layout for a long list of documents without breaking page flow
  • How should I handle a wide data table so headers remain pinned?
  • Review this modal component for nested scroll and overflow issues

How to install scroll-areas

1Skills CLI (Vercel)

npx skills add dembrandt/dembrandt-skills --skill scroll-areas -a claude-code

2Manually: put the files in place

~/.claude/skills/scroll-areas/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/scroll-areas/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about scroll-areas

How to install scroll-areas in Claude Code?

Run npx skills add dembrandt/dembrandt-skills --skill scroll-areas -a claude-code in your terminal.

When does the skill allow an inner scroll container?

It permits inner scrolling only for fixed sidebars, data tables with sticky headers, live chat streams, or code editors.

Why does the rule ban overflow: auto?

The overflow: auto declaration permits simultaneous scrolling on both axes. This confuses users and makes navigation clumsy on touch screens.

Source text

SKILL.md · MIT
---
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.

```css
/* 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

## 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)?
- [ ] On touch devices, is scroll smooth and native (`-webkit-overflow-scrolling: touch` or equivalent)?

© dembrandt · MIT · dembrandt/dembrandt-skills

Similar skills

Everything for Frontend and UI →

From the same set38

elevation-and-depth Defines rules for shadows, border radius, and surface layering in CSS. Helps the agent style cards, modals, dropdowns, and tooltips with physical depth. CX Codex +1 854installs sticky-and-fixed-elements Decides what stays on screen while the user scrolls: sticky headers, bottom toolbars, floating action buttons, pinned table headers. CX Codex +1 855installs data-display-and-selection Guides the agent through data collections: view modes, row selection, mass actions, sorting, filters and search patterns. CX Codex +1 855installs notifications-and-recovery A skill for designing notifications and error states: toasts, inline errors, banners and recovery paths. Useful when you need feedback after an action. CX Codex +1 854installs ui-context-and-scope Defines rules for user orientation in deep navigation layouts: breadcrumbs, visual section borders, and persistent impersonation banners. CX Codex +1 842installs real-world-metaphors Helps you pick between a card, carousel, drawer and accordion when designing components and navigation. CX Codex +1 841installs global-toolbar-controls Guides the layout and styling of language, currency, and unit selectors. It helps keep global controls accessible in the header or footer without cluttering primary navigation. CX Codex +1 834installs dembrandt Runs a UI/UX task through six ordered stages: brand, tokens, layout, components, polish, accessibility. Useful for a design review or a build from scratch. CX Codex +1 822installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor