Scroll Area

トークンの色の細いスクロールバーとブラウザー本来のスクロールを備えたスクロールコンテナー。縦・横・両方向に対応し、内容がはみ出すときはキーボードでフォーカスでき、端のフェードも選べます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 未対応

使い方

Tags

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
--accent
--accent-soft
--surface-hover
--success
--warning
--danger

インポート

ts
import {
  SoneScrollAreaDirective,
} from "@surface-one/angular/scroll-area";

API リファレンス

SoneScrollAreaDirectiveディレクティブ

`[soneScrollArea]` — a scroll container with thin, token-coloured scrollbars (shadcn/ui ScrollArea, spartan/ui Scroll Area) that keeps the browser's own scrolling: no scrollbar is emulated. Give it a height (or a width for `horizontal`); `orientation` picks the axes that scroll (`vertical`, `horizontal` or `both`). While its content overflows it is a keyboard stop (`tabindex="0"`, unless you set one) so the arrow keys scroll it, and a named one (`aria-label`) is a `region`. `fade` softens the edges where content is hidden (it masks the whole box, so draw a border on a wrapper).

セレクター
[soneScrollArea]
エクスポート名
soneScrollArea
入力
名前型 デフォルト
orientationScrollAreaOrientation"vertical"
fade

Fade the content out at the edges where more of it is hidden.

booleanfalse