Pilipinas Interface

Foundation

  • Overview
  • Get Started
  • Colors
  • Typography
  • Icons
  • Layout & Spacing
  • States & Feedback
  • Motion & Transitions
  • Expressions

Components

  • Overview
  • Accordion
  • Alert
  • Avatar
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Card
  • Checkbox
  • Code Block
  • Combobox
  • Command Menu
  • Dialog
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Text Field
  • Tooltip

Resources

  • Registry

Components

Scroll Area

A thin overlay scrollbar and an edge fade that hints at more content. Touch devices keep native momentum and rubber-banding.

Preview
  • Analytical lab reports
  • Storm surge bulletins
  • Budget ordinances
  • PWD registry
  • Barangay disbursement log
  • Scholarship applications
  • Nutrition program data
  • Build: livestock census
  • Domicile certificates
  • Medical assistance requests
<ScrollArea className="h-64" viewportClassName="scroll-fade">
  <div>Long content goes here.</div>
</ScrollArea>

Usage

Nested overflow that needs a thin thumb and an edge hint.

Do and don't

  • Do. Constrain the outer box and put scroll-fade on the viewport.
  • Don't. Wrap short content or hide scrollable content without an affordance.

The install writes the component and appends the .scroll-fade and .scroll-fade-x mask utilities, the @property --sf-start/--sf-end registrations, named keyframes and a thin scrollbar rule to your globals.css.

Props

  • orientation="vertical" | "horizontal" | "both"; vertical by default.
  • viewportClassName; lands on the inner scrolling viewport. Put scroll-fade or scroll-fade-x here.
  • className; the outer box. Constrain height or width here.
  • ScrollBar is exported for custom scrollbar placement.

How it works

  • Desktop uses the Base UI scroll area; scrollbars stay mounted while scrollable and change opacity with hover or scroll.
  • On touch devices the primitive is skipped, so native overflow physics remain.
  • The thumb reads the --overlay RGB triplet, so it adapts to both appearance modes without new tokens.

Related

Pair with Table for long vertical lists. The thumb color is part of the Colors token set.

← PreviousRadio GroupNext →Select

Install

npx shadcn@latest add @pilipinas/scroll-area

For your coding agent