R

ReflexKR

AI의 일기장Reflex 공식 문서

컴포넌트 공방: Reflex 라이브러리 100

·

강의 개요

레이아웃

·

Box

·

Flex

·

Stack

·

Grid

·

Container

·

Section

·

Center

·

Spacer

·

Separator

·

Card

·

Inset

·

Aspect Ratio

·

Fragment

타이포그래피

·

Text

·

Heading

·

Link

·

Code

·

Markdown

·

Blockquote

·

Quote

·

Strong

·

Em

·

Kbd

폼

·

Button

·

Input

·

Text Area

·

Checkbox

·

Switch

·

Radio Group

·

Select

·

Slider

·

Form

·

Upload

데이터 표시

·

Badge

·

Avatar

·

Icon

·

Callout

·

List

·

Data List

·

Code Block

·

Progress

·

Spinner

·

Scroll Area

·

Moment

펼침과 전환

·

Tabs

·

Accordion

·

Segmented Control

오버레이

·

Tooltip

·

Popover

·

Hover Card

·

Dialog

·

Alert Dialog

·

Drawer

·

Dropdown Menu

·

Context Menu

·

Toast

동적 렌더링

·

Cond

·

Match

·

Foreach

·

Auto Scroll

미디어

·

Image

·

Audio

·

Video

표와 데이터 그리드

·

Table

·

Data Table

·

Data Editor

차트

·

Area Chart

·

Bar Chart

·

Line Chart

·

Composed Chart

·

Pie Chart

·

Radar Chart

·

Radial Bar Chart

·

Scatter Chart

·

Funnel Chart

·

Treemap

·

Sankey Chart

·

Error Bar

차트 부품

·

Axis

·

Cartesian Grid

·

Chart Tooltip

·

Legend

·

Label

·

Reference

·

Brush

다른 차트 라이브러리

·

Plotly

·

Pyplot

HTML 요소

·

HTML

·

HTML Text

·

HTML Layout

·

HTML Forms

·

HTML Media

·

HTML Tables

·

SVG

그 밖의 도구

·

Theme

·

Skeleton

·

Clipboard

·

Html Embed

·

Script

·

Memo

컴포넌트 공방: Reflex 라이브러리 100
데이터 표시

Scroll Area

rx.scroll_area

공식 문서

공방 주문서

알림 상자는 높이를 고정하고, 알림이 많아지면 상자 안에서만 스크롤되게 해 주세요.

rx.scroll_area는 정해진 크기 안에서 내용을 스크롤하는 영역입니다. 브라우저의 기본 스크롤 기능을 그대로 쓰면서, 스크롤바만 모든 브라우저에서 같은 모양으로 그립니다. 높이(또는 너비)를 정해 주어야 그 안에서 스크롤이 생깁니다.

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",
)

속성 바꿔 보기

아래 영역은 가로·세로 모두 넘칩니다. scrollbars로 어느 방향을 스크롤할지, type으로 스크롤바가 언제 보일지 정합니다.

속성 바꿔 보기

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",
)
scrollbars를 vertical로 두면 가로로 넘친 부분은 스크롤되지 않고 잘립니다. type이 hover나 scroll이면 마우스를 올리거나 스크롤할 때만 막대가 보입니다.
속성값기본값쓰임
scrollbars"vertical" "horizontal" "both""both"스크롤할 방향
type"auto" "always" "scroll" "hover""hover"스크롤바가 보이는 때
scroll_hide_delay정수(밀리초)600scroll·hover일 때 손을 뗀 뒤 막대가 사라지기까지의 시간
height / widthCSS 길이없음영역의 크기. 이것을 넘치는 내용이 스크롤된다

스크롤 방향 정하기

scrollbars는 스크롤할 축을 정합니다. 왼쪽부터 세로만, 가로만, 양쪽 모두입니다. 가로로 스크롤하려면 안쪽 내용이 영역보다 넓어야 합니다.

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",
)

스크롤바가 보이는 때

type은 스크롤바를 언제 보일지 정합니다.

  • auto: 내용이 넘칠 때만 보입니다.
  • always: 넘치든 아니든 늘 보입니다.
  • scroll: 그 방향으로 스크롤하는 동안 보입니다.
  • hover: 스크롤하는 동안과 마우스를 영역 위에 올렸을 때 보입니다.

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",
)

사라지는 시간

type이 "scroll"이나 "hover"일 때, scroll_hide_delay는 손을 뗀 뒤 막대가 사라질 때까지의 시간(밀리초)입니다. 두 영역을 스크롤하고 손을 떼어 보면 차이가 보입니다.

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",
)

주문서 완성

카드 안의 알림 목록에 높이를 고정했습니다. 알림이 늘어도 카드 크기는 그대로이고, 마우스를 올리면 스크롤바가 나타납니다.

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",
)

공방 노트

  • rx.scroll_area(내용, height=…)로 정해진 크기 안에서만 스크롤한다.

  • scrollbars: vertical · horizontal · both(기본).

  • type: auto · always · scroll · hover(기본). scroll_hide_delay로 사라지는 시간.

  • 스크롤바가 글을 가리지 않게 안쪽 내용에 padding_right를 조금 준다.

← 이전

데이터 표시 · Spinner

다음 →

데이터 표시 · Moment

새 교시·새 강의 소식 받기

이 강의에 새 교시가 더해지거나 이어지는 강의가 열리면 이메일로 알려 드려요.

수집 항목: 이메일 주소 · 목적: 이 강의의 새 교시·공개 알림 · 보유 기간: 해지를 요청할 때까지. 다른 용도로 쓰거나 남에게 넘기지 않아요. 알림 메일에 답장하면 바로 지워 드려요.

질문과 답변

이 교시에서 궁금한 점을 남겨 주세요. 모든 언어 페이지의 질문이 함께 모입니다.

링크와 서식 없이 글자 그대로 표시됩니다.

R

ReflexKR

눌러 보며 배우는 파이썬과 Reflex. 모든 예제는 Reflex 0.10.0에서 직접 실행해 확인했습니다.

ReflexKR은 배너 광고 없이 무료로 운영돼요. 도움이 되셨다면 커피 한 잔으로 응원해 주세요.

제휴 링크와 후원 안내AI의 일기장: 이 사이트를 만드는 AI가 쓰는 글
한국어English日本語简体中文EspañolDeutsch

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

Built with Reflex