Dashral Pro is on the wayGet 30% off at launch

Dashral

Scroll Shadow

A scroll area whose edges fade while there's more to see, instead of a scrollbar.

$ pnpm dlx shadcn@latest add https://dashral.com/r/scroll-shadow.json
  • v2.24.0Oct 24
  • v2.23.0Oct 23
  • v2.22.0Oct 22
  • v2.21.0Oct 21
  • v2.20.0Oct 20
  • v2.19.0Oct 19
  • v2.18.0Oct 18
  • v2.17.0Oct 17
  • v2.16.0Oct 16
  • v2.15.0Oct 15
  • v2.14.0Oct 14
  • v2.13.0Oct 13
  • v2.12.0Oct 12
  • v2.11.0Oct 11
  • v2.10.0Oct 10
  • v2.9.0Oct 9
  • v2.8.0Oct 8
  • v2.7.0Oct 7
  • v2.6.0Oct 6
  • v2.5.0Oct 5
  • v2.4.0Oct 4
  • v2.3.0Oct 3
  • v2.2.0Oct 2
  • v2.1.0Oct 1

Installation

$ pnpm dlx shadcn@latest add https://dashral.com/r/scroll-shadow.json

Adds the component, the components it builds on, its npm packages and the theme tokens it uses. Using Dashral often? Add the registry to components.json once:

components.json
{
  "registries": {
    "@dashral": "https://dashral.com/r/{name}.json"
  }
}

Then add components by name:

$ pnpm dlx shadcn@latest add @dashral/scroll-shadow

Usage

example.tsx
import { ScrollShadow } from "@/components/dashral/scroll-shadow"

<ScrollShadow className="h-64 space-y-2">
  {notifications.map((notification) => (
    <p key={notification.id}>{notification.text}</p>
  ))}
</ScrollShadow>

Examples

Horizontal with arrows

arrows adds ‹ › buttons for mouse users without a trackpad; keyboard users tab through the items.

Starter

$9

per month

Basic

$18

per month

Growth

$27

per month

Team

$36

per month

Business

$45

per month

Scale

$54

per month

Enterprise

$63

per month

Custom

$72

per month

Chat

Opens at the latest message; a new one scrolls into view, and the fade says there's more above.

Liam Johnson

Morning! Did the v2.4 release go out?

Yes, at 9:12. Smoke tests are green.

Nice. Any issues in checkout?

One: the promo field opened by default. Fixed in 9c19c23.

Great. Can you post the changelog in #releases?

Done. I also tagged the design team.

Perfect, thanks!

Category chips

One row of filters that scrolls sideways, with arrows for mouse users.

Showing all products

API reference

ScrollShadow

PropTypeDefault
asElementType

The element that scrolls, e.g. "ul".

"div"
orientation"vertical" | "horizontal""vertical"
sizenumber

Fade length in pixels.

40
scrollbarboolean

Show the scrollbar too.

false
arrows / stepboolean / number

Horizontal: ‹ › buttons and how far they scroll.

false / 80% of the width

Keyboard

KeysAction
TabFocusable content scrolls into view
Arrow keysorPage UporPage DownScroll when the area itself has focus

Accessibility

  • The fades and arrows are decorative; every way of scrolling keeps working.

Motion

  • Arrow clicks scroll smoothly; instantly with reduced motion.