R

ReflexKR

Reflex-Dokumentation

Die Komponentenwerkstatt: Reflex' 100 Bibliotheksbausteine

·

Kursüberblick

Layout

·

Box

·

Flex

·

Stack

·

Grid

·

Container

·

Section

·

Center

·

Spacer

·

Separator

·

Card

·

Inset

·

Aspect Ratio

·

Fragment

Typografie

·

Text

·

Heading

·

Link

·

Code

·

Markdown

·

Blockquote

·

Quote

·

Strong

·

Em

·

Kbd

Formulare

·

Button

·

Input

·

Text Area

·

Checkbox

·

Switch

·

Radio Group

·

Select

·

Slider

·

Form

·

Upload

Datenanzeige

·

Badge

·

Avatar

·

Icon

·

Callout

·

List

·

Data List

·

Code Block

·

Progress

·

Spinner

·

Scroll Area

·

Moment

Auf- und Zuklappen

·

Tabs

·

Accordion

·

Segmented Control

Overlays

·

Tooltip

·

Popover

·

Hover Card

·

Dialog

·

Alert Dialog

·

Drawer

·

Dropdown Menu

·

Context Menu

·

Toast

Dynamisches Rendern

·

Cond

·

Match

·

Foreach

·

Auto Scroll

Medien

·

Image

·

Audio

·

Video

Tabellen und Datengrids

·

Table

·

Data Table

·

Data Editor

Diagramme

·

Area Chart

·

Bar Chart

·

Line Chart

·

Composed Chart

·

Pie Chart

·

Radar Chart

·

Radial Bar Chart

·

Scatter Chart

·

Funnel Chart

·

Treemap

·

Sankey Chart

·

Error Bar

Diagrammbausteine

·

Axis

·

Cartesian Grid

·

Chart Tooltip

·

Legend

·

Label

·

Reference

·

Brush

Andere Diagrammbibliotheken

·

Plotly

·

Pyplot

HTML-Elemente

·

HTML

·

HTML Text

·

HTML Layout

·

HTML Forms

·

HTML Media

·

HTML Tables

·

SVG

Weitere Werkzeuge

·

Theme

·

Skeleton

·

Clipboard

·

Html Embed

·

Script

·

Memo

Die Komponentenwerkstatt: Reflex' 100 Bibliotheksbausteine
Datenanzeige

Scroll Area

rx.scroll_area

Offizielle Doku

Werkstattauftrag

Gib dem Benachrichtigungskasten eine feste Höhe; werden es viele Benachrichtigungen, soll nur innerhalb des Kastens gescrollt werden.

rx.scroll_area ist ein Bereich, in dem Inhalt innerhalb einer festen Größe gescrollt wird. Er nutzt das normale Scrollen des Browsers und zeichnet nur die Scrollbalken in allen Browsern gleich. Erst wenn du eine Höhe (oder Breite) festlegst, entsteht darin eine Scrollmöglichkeit.

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

Props ausprobieren

Der Bereich unten läuft waagerecht wie senkrecht über. scrollbars legt fest, in welche Richtung gescrollt wird, type, wann die Scrollbalken zu sehen sind.

Props ausprobieren

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",
)
Steht scrollbars auf vertical, wird der waagerecht überlaufende Teil nicht gescrollt, sondern abgeschnitten. Bei type hover oder scroll erscheint der Balken nur beim Darüberfahren mit der Maus bzw. beim Scrollen.
PropWerteStandardVerwendung
scrollbars"vertical" "horizontal" "both""both"Scrollrichtung
type"auto" "always" "scroll" "hover""hover"Wann die Scrollbalken sichtbar sind
scroll_hide_delayGanzzahl (Millisekunden)600Bei scroll/hover: Zeit, bis der Balken nach dem Loslassen verschwindet
height / widthCSS-LängekeinerGröße des Bereichs; was darüber hinausgeht, wird gescrollt

Die Scrollrichtung festlegen

scrollbars bestimmt die Scrollachse. Von links: nur senkrecht, nur waagerecht, beides. Für waagerechtes Scrollen muss der Inhalt breiter sein als der Bereich.

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

Wann die Scrollbalken sichtbar sind

type legt fest, wann die Scrollbalken erscheinen.

  • auto: nur, wenn der Inhalt überläuft.
  • always: immer, ob er überläuft oder nicht.
  • scroll: während in diese Richtung gescrollt wird.
  • hover: während des Scrollens und wenn die Maus über dem Bereich ist.

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

Ausblendzeit

Ist type auf "scroll" oder "hover" gesetzt, ist scroll_hide_delay die Zeit (in Millisekunden), bis der Balken nach dem Loslassen verschwindet. Scroll in beiden Bereichen und lass los – dann siehst du den Unterschied.

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

Auftrag erledigt

Die Benachrichtigungsliste in der Card hat eine feste Höhe. Auch wenn mehr Benachrichtigungen dazukommen, bleibt die Card gleich groß, und beim Darüberfahren mit der Maus erscheint der Scrollbalken.

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

Werkstattnotizen

  • Mit rx.scroll_area(Inhalt, height=…) wird nur innerhalb der festen Größe gescrollt.

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

  • type: auto · always · scroll · hover (Standard). scroll_hide_delay steuert die Ausblendzeit.

  • Damit der Scrollbalken keinen Text verdeckt, gibst du dem Inhalt etwas padding_right.

← Zurück

Datenanzeige · Spinner

Weiter →

Datenanzeige · Moment

Über neue Lektionen informiert werden

Wir schicken dir eine E-Mail, wenn dieser Kurs neue Lektionen bekommt oder ein Folgekurs erscheint.

Erhoben: deine E-Mail-Adresse · Zweck: Hinweise auf neue Lektionen oder den Start dieses Kurses · Speicherdauer: bis du die Löschung verlangst. Keine andere Nutzung, keine Weitergabe. Antworte einfach auf eine Benachrichtigung, dann löschen wir sie sofort.

Fragen & Antworten

Frag alles zu dieser Lektion. Fragen aus allen Sprachversionen dieser Seite erscheinen hier gemeinsam.

Wird als reiner Text angezeigt, ohne Links oder Formatierung.

R

ReflexKR

Python und Reflex zum Anfassen. Alle Beispiele wurden mit Reflex 0.10.0 ausgeführt und geprüft.

ReflexKR ist kostenlos und ohne Werbebanner. Wenn es dir geholfen hat, kannst du es mit einem Kaffee unterstützen. ☕ Spendier uns einen Kaffee

Hinweis zu Affiliate-Links
한국어English日本語简体中文EspañolDeutsch

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

Built with Reflex