Skip to content
Back

Scroll areaPro

Native scrolling with thin overlay scrollbars and edge fades that grow with what's left; Oxyn's stick-to-bottom follows a streaming transcript and offers Jump to latest when you scroll up.

oxyn add scroll-area
You

Users get logged out when two tabs refresh at once. Can you find out why?

Atlas

Reading auth/session.ts and the refresh handler.

Atlas

Both tabs call refresh() with the same refresh token. The second call gets 401 because the first one rotated it.

Atlas

Plan: a single-flight lock around refresh(), keyed by account, and a retry for the request that waited.

The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Long transcripts, file lists and strips inside panels.
  • Scrolling must stay native (momentum, keyboard, screen readers), with quieter bars and fades that say there is more.

When not to use

Installation

Scroll area is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add scroll-area

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Transcript

Follows new lines; scroll up to let go.

You

Users get logged out when two tabs refresh at once. Can you find out why?

Atlas

Reading auth/session.ts and the refresh handler.

Atlas

Both tabs call refresh() with the same refresh token. The second call gets 401 because the first one rotated it.

Atlas

Plan: a single-flight lock around refresh(), keyed by account, and a retry for the request that waited.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

List

A file list with edge fades.

auth/session.ts+42 −8
api/client.ts+17 −3
auth/session.test.ts+64
CHANGELOG.md+2
api/retry.ts+11 −11
auth/token.ts+3 −1
README.md+1
package.json+1 −1
api/types.ts+6
auth/index.ts+2 −2
e2e/login.spec.ts+28
tsconfig.json+1
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Strip

A horizontal strip that snaps.

Run 248 · fix auth
Run 247 · docs
Run 246 · deps
Run 245 · tests
Run 244 · perf
Run 243 · lint
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ScrollArea

PropTypeDefaultDescription
orientationString"vertical"`vertical` · `horizontal` · `both`.
fadef3228.0Edge fade px (0 = off).
scrollbarsString"auto"`auto` · `always` · `hidden`.
hide_delayu32900Scrollbars linger ms.
heightf32240.0Viewport height px.
widthf32360.0Viewport width px.
labelOption<String>Default::default()Accessible name (the viewport becomes a region).
snapOption<String>Default::default()`scroll-snap-type` for the viewport.
stick_to_bottomboolDefault::default()Oxyn plus: follow new content.
linesVec<Line>Default::default()Oxyn plus: transcript lines (with `stream`, appended one by one).
streamboolDefault::default()Append a line every `stream_ms`.
stream_msu321400Stream interval ms.
childrenElementDefault::default()Static content.
on_edge_changeEventHandler<(bool, bool, bool, bool)>—Edges changed (top, bottom, left, right).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabFocus the viewport
ArrowsorPage UporDownorHomeorEndorSpaceScroll natively

Accessibility

  • Scrolling stays native; with a label the viewport is a named region.
  • The overlay bars are aria-hidden; the Jump to latest pill is a real button.
From the spec

Native scrolling is untouched: the viewport is focusable and keyboard-scrollable; with a label it is a named region. Bars are decorative; the pill is a real button.

Motion & interaction

Thumbs fade in while scrolling or on hover and fade out after hide_delay; under a fine pointer they thicken on hover. Edge fades grow with the distance left to each edge (capped at fade). New transcript lines rise in.

Timing
TransitionDurationEasingReduced motion
Bars in120 mslinearsame
Bars out300 ms after hide_delaylinearsame
Thumb thicken120 mslinearnone
Jump to latestsmooth scrollnativeinstant

Responsive behaviour

  • Touch keeps native momentum; thumbs thicken only under a fine pointer.
Edge cases (spec)

Short content draws no bar and no fades. Very long content keeps a minimum thumb of 24 px. Touch keeps native momentum and overscroll containment.

Notes for AI

  • Import ScrollArea, Line from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: ScrollAreaEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI