Library

/

Datadisplay

/

Data-list

The DataList component displays key-value pairs and is particularly helpful for showing metadata.

A DataList needs to be initialized using rx.data_list.root() and currently takes in data list items: rx.data_list.item

Status
Authorized
ID
U-474747
Name
Developer Success
Company
Reflex
rx.card(
    rx.data_list.root(
        rx.data_list.item(
            rx.data_list.label("Status"),
            rx.data_list.value(
                rx.badge(
                    "Authorized",
                    variant="soft",
                    radius="full",
                )
            ),
            align="center",
        ),
        rx.data_list.item(
            rx.data_list.label("ID"),
            rx.data_list.value(rx.code("U-474747")),
        ),
        rx.data_list.item(
            rx.data_list.label("Name"),
            rx.data_list.value("Developer Success"),
            align="center",
        ),
        rx.data_list.item(
            rx.data_list.label("Email"),
            rx.data_list.value(
                rx.link(
                    "success@reflex.dev",
                    href="mailto:success@reflex.dev",
                ),
            ),
        ),
        rx.data_list.item(
            rx.data_list.label("Company"),
            rx.data_list.value(
                rx.link(
                    "Reflex",
                    href="https://reflex.dev",
                ),
            ),
        ),
    ),
),

Root element for a DataList component.

Test
PropType | ValuesDefaultInteractive
orientation
"horizontal" | "vertical"
size
"1" | "2" | "3"
trim
"normal" | "start" | "end" | ...

Event Triggers

See the full list of default event triggers

Did you find this useful?

Raise an issue

Links

HomeShowcaseBlogChangelog

Join Newsletter

Get the latest updates and news about Reflex.

Copyright © 2024 Pynecone, Inc.