Skip to content

VirtualizerScrollView

Andrew Sutton edited this page Jan 26, 2024 · 2 revisions

image

[<ReactComponent>]
let VirtualizerScrollViewTest() =
    Fui.virtualizerScrollView [
        virtualizerScrollView.numItems 1000
        virtualizerScrollView.itemSize 100
        virtualizerScrollView.axis.horizontal
        virtualizerScrollView.container [
            prop.role "list"
            prop.style [
                style.height 300
                style.width (length.percent 100)
                style.padding (10, 2)
                style.gap 10
            ]
        ]
        virtualizerScrollView.children (fun (index: float) _ ->
            Fui.button [
                button.style [
                    style.width (length.percent 100)
                    style.height (length.percent 100)
                ]
                button.text $"Node-{index}"
            ]
        )
    ]
Clone this wiki locally