Skip to content

Please, add contentContainerStyle gap style support #2097

@fax1ty

Description

@fax1ty

Problem Statement

Can we have a way to adjust the spacing between items? At the moment, contentContainerStyle allows us to only adjust the padding and background color.

Image

Proposed Solution

It would be helpful to have the ability to customize the layout in the recycler code.

Example Usage

<FlashList gap={20} />

Alternatives Considered

I can create some invisible gaps between items using ItemSeparatorComponent={renderGap}, or I can adjust the margins of each item.

Priority

  • Critical - Blocking my project
  • High - Significant improvement to my workflow
  • Medium - Would be nice to have
  • Low - Minor enhancement

Additional Context

Currently, this breaks the promise of a "drop-in replacement for FlatList", as FlashList does not support all the styling options available in React Native.

By the way, the TS misleads users by resolving styles as a full set of styles. Without referring to the documentation, it is difficult to determine what is going wrong and why.

Image

Checklist

  • I've searched existing issues and discussions
  • I've provided clear use cases for this feature
  • I'm willing to help test this feature if implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions