R

ReflexKR

Reflex Docs

The Component Workshop: Reflex's 100 Library Components

·

Course overview

Layout

·

Box

·

Flex

·

Stack

·

Grid

·

Container

·

Section

·

Center

·

Spacer

·

Separator

·

Card

·

Inset

·

Aspect Ratio

·

Fragment

Typography

·

Text

·

Heading

·

Link

·

Code

·

Markdown

·

Blockquote

·

Quote

·

Strong

·

Em

·

Kbd

Forms

·

Button

·

Input

·

Text Area

·

Checkbox

·

Switch

·

Radio Group

·

Select

·

Slider

·

Form

·

Upload

Data display

·

Badge

·

Avatar

·

Icon

·

Callout

·

List

·

Data List

·

Code Block

·

Progress

·

Spinner

·

Scroll Area

·

Moment

Disclosure

·

Tabs

·

Accordion

·

Segmented Control

Overlay

·

Tooltip

·

Popover

·

Hover Card

·

Dialog

·

Alert Dialog

·

Drawer

·

Dropdown Menu

·

Context Menu

·

Toast

Dynamic rendering

·

Cond

·

Match

·

Foreach

·

Auto Scroll

Media

·

Image

·

Audio

·

Video

Tables and data grids

·

Table

·

Data Table

·

Data Editor

Charts

·

Area Chart

·

Bar Chart

·

Line Chart

·

Composed Chart

·

Pie Chart

·

Radar Chart

·

Radial Bar Chart

·

Scatter Chart

·

Funnel Chart

·

Treemap

·

Sankey Chart

·

Error Bar

Chart parts

·

Axis

·

Cartesian Grid

·

Chart Tooltip

·

Legend

·

Label

·

Reference

·

Brush

Other chart libraries

·

Plotly

·

Pyplot

HTML elements

·

HTML

·

HTML Text

·

HTML Layout

·

HTML Forms

·

HTML Media

·

HTML Tables

·

SVG

Other tools

·

Theme

·

Skeleton

·

Clipboard

·

Html Embed

·

Script

·

Memo

The Component Workshop: Reflex's 100 Library Components
Data display

Scroll Area

rx.scroll_area

Official docs

Workshop order

Give the notification box a fixed height, and when notifications pile up, let them scroll inside the box only.

rx.scroll_area is a region whose content scrolls within a fixed size. It keeps the browser's native scrolling and only draws the scrollbars so they look the same in every browser. You need to set a height (or width) for scrolling to appear inside it.

Three fundamental aspects of typography are legibility, readability, and aesthetics. Although in a non-technical sense legible and readable are often used synonymously, typographically they are separate but related concepts.

Legibility describes how easily individual characters can be distinguished from one another. For instance, if a b and an h, or a 3 and an 8, are difficult to distinguish at small sizes, this is a problem of legibility.

Typographers are concerned with legibility insofar as it is their job to select the correct font to use. Using only uppercase letters reduces legibility.

rx.scroll_area(
    rx.flex(
        rx.text(
            "Three fundamental aspects of typography are legibility, readability, and aesthetics. "
            "Although in a non-technical sense legible and readable are often used synonymously, "
            "typographically they are separate but related concepts."
        ),
        rx.text(
            "Legibility describes how easily individual characters can be distinguished from one another. "
            "For instance, if a b and an h, or a 3 and an 8, are difficult to distinguish at small sizes, "
            "this is a problem of legibility."
        ),
        rx.text(
            "Typographers are concerned with legibility insofar as it is their job to select the correct font to use. "
            "Using only uppercase letters reduces legibility."
        ),
        direction="column",
        spacing="4",
        padding_right="16px",
    ),
    type="always",
    scrollbars="vertical",
    height="180px",
)

Try the props

The region below overflows both horizontally and vertically. scrollbars decides which direction scrolls, and type decides when the scrollbars show.

Try the props

Card 1

Card 2

Card 3

Card 4

Card 5

Card 6

Card 7

Card 8

Card 9

Card 10

Card 11

Card 12

Card 13

Card 14

Card 15

Card 16

Card 17

Card 18

Card 19

Card 20

Card 21

Card 22

Card 23

Card 24

Card 25

Card 26

Card 27

Card 28

Card 29

Card 30

Card 31

Card 32

Card 33

Card 34

Card 35

Card 36

Card 37

Card 38

Card 39

Card 40

type

scrollbars

rx.scroll_area(
    rx.grid(
        *[rx.card(rx.text("Card ", i)) for i in range(1, 41)],
        columns="8",
        spacing="2",
        width="900px",
        padding="8px",
    ),
    type="hover",
    scrollbars="both",
    height="180px",
)
With scrollbars set to vertical, horizontal overflow is clipped rather than scrolled. With type hover or scroll, the bars only show when you hover or scroll.
PropValuesDefaultUse
scrollbars"vertical" "horizontal" "both""both"Scroll direction
type"auto" "always" "scroll" "hover""hover"When the scrollbars show
scroll_hide_delayInteger (milliseconds)600With scroll or hover, how long until the bars disappear after you stop
height / widthCSS lengthNoneSize of the region; content that exceeds it scrolls

Choosing the scroll direction

scrollbars sets which axis scrolls. From the left: vertical only, horizontal only, and both. To scroll horizontally, the inner content must be wider than the region.

Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical. Vertical.

Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal. Horizontal.

Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways. Both ways.

rx.grid(
    rx.scroll_area(
        rx.text("Vertical. " * 40, size="2", padding="8px", padding_right="24px"),
        type="always",
        scrollbars="vertical",
        height="150px",
    ),
    rx.scroll_area(
        rx.text("Horizontal. " * 40, size="2", padding="8px", width="700px"),
        type="always",
        scrollbars="horizontal",
        height="150px",
    ),
    rx.scroll_area(
        rx.text("Both ways. " * 60, size="2", padding="8px", width="400px"),
        type="always",
        scrollbars="both",
        height="150px",
    ),
    columns="3",
    spacing="3",
)

When the scrollbars show

type decides when the scrollbars appear.

  • auto: only when the content overflows.
  • always: always, whether it overflows or not.
  • scroll: while you scroll in that direction.
  • hover: while you scroll and while the mouse is over the region.

type = 'auto'

Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished.

type = 'always'

Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished.

type = 'scroll'

Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished.

type = 'hover'

Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished. Legibility describes how easily individual characters can be distinguished.

rx.grid(
    *[
        rx.scroll_area(
            rx.flex(
                rx.text("type = '" + t + "'", weight="bold"),
                rx.text("Legibility describes how easily individual characters can be distinguished. " * 4, size="2"),
                direction="column",
                spacing="2",
                padding="8px",
                padding_right="20px",
            ),
            type=t,
            scrollbars="vertical",
            height="150px",
        )
        for t in ["auto", "always", "scroll", "hover"]
    ],
    columns="4",
    spacing="3",
)

How long until they fade

When type is "scroll" or "hover", scroll_hide_delay is the time in milliseconds before the bars disappear after you stop. Scroll both regions and let go to see the difference.

Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast. Hides fast.

Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds. Stays for 3 seconds.

rx.grid(
    rx.scroll_area(
        rx.text("Hides fast. " * 50, size="2", padding="8px", padding_right="20px"),
        type="scroll",
        scroll_hide_delay=200,
        height="120px",
    ),
    rx.scroll_area(
        rx.text("Stays for 3 seconds. " * 40, size="2", padding="8px", padding_right="20px"),
        type="scroll",
        scroll_hide_delay=3000,
        height="120px",
    ),
    columns="2",
    spacing="3",
)

Filling the order

The notification list inside the card has a fixed height. As notifications pile up the card stays the same size, and the scrollbar appears when you hover.

Notifications

Order #1001 has shipped.

Order #1002 has shipped.

Order #1003 has shipped.

Order #1004 has shipped.

Order #1005 has shipped.

Order #1006 has shipped.

Order #1007 has shipped.

Order #1008 has shipped.

Order #1009 has shipped.

Order #1010 has shipped.

Order #1011 has shipped.

Order #1012 has shipped.

Order #1013 has shipped.

Order #1014 has shipped.

Order #1015 has shipped.

rx.card(
    rx.text("Notifications", weight="bold", margin_bottom="2"),
    rx.scroll_area(
        rx.vstack(
            *[
                rx.hstack(
                    rx.avatar(fallback=str(i), size="2", radius="full"),
                    rx.text("Order #" + str(1000 + i) + " has shipped.", size="2"),
                    align="center",
                    padding_right="16px",
                )
                for i in range(1, 16)
            ],
            spacing="3",
        ),
        type="hover",
        scrollbars="vertical",
        height="220px",
    ),
    max_width="340px",
)

Workshop notes

  • rx.scroll_area(content, height=…) scrolls only within a fixed size.

  • scrollbars: vertical · horizontal · both (default).

  • type: auto · always · scroll · hover (default); scroll_hide_delay sets the fade-out time.

  • Give the inner content a little padding_right so the scrollbar doesn't cover the text.

← Previous

Data display · Spinner

Next →

Data display · Moment

Get news about new lessons

We'll email you when this course gets new lessons or a follow-up course opens.

We collect: your email address · Purpose: news about new lessons or the launch of this course · Kept until: you ask us to remove it. We never use it for anything else or share it. Reply to any notice email and we'll delete it right away.

Questions & answers

Ask anything about this lesson. Questions from every language version of this page appear together.

Shown as plain text, without links or formatting.

R

ReflexKR

Learn Python and Reflex by doing. Every example was run and verified on Reflex 0.10.0.

ReflexKR is free, with no banner ads. If it helped you, you can support it with a coffee. ☕ Buy us a coffee

Affiliate disclosure
한국어English日本語简体中文EspañolDeutsch

© 2026 ReflexKR · Since 2026 · CC BY-NC 4.0

Built with Reflex