Components/Surfaces/Scroll Area
COMPONENT31.31

Scroll Area

Scrollable region with styled scrollbars and optional fade edges that follow the scroll position.


INSTALL

1pnpm dlx @sayagodev/mo add scroll-area

Or import the files from the package (no copy):

1import "@sayagodev/mo/css/scroll-area.css";2import "@sayagodev/mo/js/scroll-area.js";

EXAMPLES

Default

Tags

v1.2.0-beta.49

v1.2.0-beta.48

v1.2.0-beta.47

v1.2.0-beta.46

v1.2.0-beta.45

v1.2.0-beta.44

v1.2.0-beta.43

v1.2.0-beta.42

v1.2.0-beta.41

v1.2.0-beta.40

v1.2.0-beta.39

v1.2.0-beta.38

v1.2.0-beta.37

v1.2.0-beta.36

v1.2.0-beta.35

v1.2.0-beta.34

v1.2.0-beta.33

v1.2.0-beta.32

v1.2.0-beta.31

v1.2.0-beta.30

v1.2.0-beta.29

v1.2.0-beta.28

v1.2.0-beta.27

v1.2.0-beta.26

v1.2.0-beta.25

v1.2.0-beta.24

v1.2.0-beta.23

v1.2.0-beta.22

v1.2.0-beta.21

v1.2.0-beta.20

v1.2.0-beta.19

v1.2.0-beta.18

v1.2.0-beta.17

v1.2.0-beta.16

v1.2.0-beta.15

v1.2.0-beta.14

v1.2.0-beta.13

v1.2.0-beta.12

v1.2.0-beta.11

v1.2.0-beta.10

v1.2.0-beta.9

v1.2.0-beta.8

v1.2.0-beta.7

v1.2.0-beta.6

v1.2.0-beta.5

v1.2.0-beta.4

v1.2.0-beta.3

v1.2.0-beta.2

v1.2.0-beta.1

v1.2.0-beta.0
Horizontal
Design Engineering Marketing Product Research Sales Support Operations Finance Legal People IT
Tags

Tags

Design Engineering Marketing Product Research Sales Support Operations Finance Legal People IT Security Data Infrastructure Quality Accessibility Localization Analytics Growth Platform Developer tools Documentation Community
Fades
  • Inbox triage
  • Design review
  • API contract
  • QA pass
  • Launch notes
  • Metrics follow-up
  • Retro actions
  • Hiring loop

data-fades — block axis

Design Engineering Marketing Product Research Sales Support Operations

data-fades="x" — inline axis

USAGE

1<div data-scroll-area>2  <div class="p-4"></div>3</div>4 5<!-- fade edges (block axis; "x" inline, "xy" both) -->6<div data-scroll-area data-fades></div>

API

NAMEKINDDESCRIPTION
[data-scroll-area]attributeThe scrollable box; thin scrollbar, border-color thumb
data-fades | "x" | "xy"attributeMask-image edge fades per axis; static without scroll-area.js
data-at-top/bottom/left/rightattributeSet by scroll-area.js at an edge — that side renders crisp
--mo-scroll-area-height / -widthtokenBox sizing hooks; no default height
--mo-scroll-fade-sizetokenFade depth, default min(2.5rem, 12%)

FILES

src/css/scroll-area.csssrc/js/scroll-area.js
Install:mo add scroll-area

THEMING · PLAYGROUND

This is the exact component from the examples above, wearing a completely different theme. Edit the tokens and --mo-* hooks in the editor — autocomplete knows them all — and the preview obeys in real time. Your CSS always wins.

Tokens & hooks — edit live
Global tokens
--border--muted-foreground--radius
Component hooks
--mo-scroll-area-height--mo-scroll-area-width--mo-scroll-fade-size

Preview

Revisions

v1.2.0-beta.49

v1.2.0-beta.48

v1.2.0-beta.47

v1.2.0-beta.46

v1.2.0-beta.45

Your CSS

Try it: type --mo- for the component hooks, or edit any value — the preview obeys in real time.