brijr/ui

Lab

Scroll Area

npx shadcn@latest add @brijr/scroll-area

Type

When the scrollbar shows. hover is the default; hover or scroll each list to compare.

Tags

v1.2.0-beta.50

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

type="hover"

Tags

v1.2.0-beta.50

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

type="scroll"

Tags

v1.2.0-beta.50

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

type="auto"

Tags

v1.2.0-beta.50

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

type="always"

Orientation

Both use type="auto" so the bars stay visible.

Blue Train
Kind of Blue
Mingus Ah Um
Time Out
Moanin'
Somethin' Else
Saxophone Colossus
Speak No Evil
Maiden Voyage
Empyrean Isles
ScrollBar orientation="horizontal"
Blue Train
Kind of Blue
Mingus Ah Um
Time Out
Moanin'
Somethin' Else
Saxophone Colossus
Speak No Evil
Maiden Voyage
Empyrean Isles
Blue Train
Kind of Blue
Mingus Ah Um
Time Out
Moanin'
Somethin' Else
Saxophone Colossus
Speak No Evil
Maiden Voyage
Empyrean Isles
Blue Train
Kind of Blue
Mingus Ah Um
Time Out
Moanin'
Somethin' Else
Saxophone Colossus
Speak No Evil
Maiden Voyage
Empyrean Isles
both axes

Scrollbar slot

ScrollArea renders a vertical ScrollBar through its scrollbar prop. Pass the bars you want, or null to keep the browser's own.

Blue Train
Kind of Blue
Mingus Ah Um
Time Out
Moanin'
Somethin' Else
Saxophone Colossus
Speak No Evil
Maiden Voyage
Empyrean Isles
scrollbar={<ScrollBar orientation="horizontal" />}

Tags

v1.2.0-beta.50

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

scrollbar={null} · browser scrollbar

Viewport

The viewport is the element that scrolls. onScroll fires from it and viewportRef points at it; ref stays on the root.

Tags

v1.2.0-beta.50

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

scrollTop 0px
onScroll · viewportRef

Content

Only one line of content.
fits · type="auto" · no bar
Only one line of content.
fits · type="always" · empty track

Release 1. Scroll areas keep the end in view while content grows, and let go as soon as you scroll up. Tabs report which way the selection moved, so panels can slide in from the matching side.

Release 2. Scroll areas keep the end in view while content grows, and let go as soon as you scroll up. Tabs report which way the selection moved, so panels can slide in from the matching side.

Release 3. Scroll areas keep the end in view while content grows, and let go as soon as you scroll up. Tabs report which way the selection moved, so panels can slide in from the matching side.

Release 4. Scroll areas keep the end in view while content grows, and let go as soon as you scroll up. Tabs report which way the selection moved, so panels can slide in from the matching side.

Release 5. Scroll areas keep the end in view while content grows, and let go as soon as you scroll up. Tabs report which way the selection moved, so panels can slide in from the matching side.

Release 6. Scroll areas keep the end in view while content grows, and let go as soon as you scroll up. Tabs report which way the selection moved, so panels can slide in from the matching side.

long prose