Skip to content

Adding a gap/spacing between items #598

@rasgo-cc

Description

@rasgo-cc

Is your feature request related to a problem? Please describe.
Not being able to add spacing (gap) between items.

Describe the solution you'd like
I'd like to have something like the gap prop in @tanstack/react-virtual so you can pass the exact amount of pixels that should be placed in between items. Passing that value should allow the virtualization code to account for that and thus calculate the item offsets correctly.

Describe alternatives you've considered
So far the only way I found to have spacing between items is to add a top and bottom margin (so it's vertically centered). This is inconvenient as it will also add a margin to the top and bottom of the list, not just in between the items.

Additional context
(none)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions