meliorence / meliorence/react-native-snap-carousel

Dynamic Height Content in Carousel

Open
#997 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Is this a bug report, a feature request, or a question?

Question

I need to render text of dynamic size in carousel elements. I am getting blank space under the text for different elements. How can I either

  1. Remove this blank space.
  2. Snap elements to the bottom of the view
What I am getting:

green background is part of carousel styling

IMG_6529

What i Want:

IMG_6530

Where my carousel code is

<Carousel
              loop
              width={rootstore.windowWidth}
              height={rootstore.windowHeight / 2}
              data={data}
              renderItem={renderFunction}
              inactiveSlideScale={1}
              style={{
                position: "absolute",
                bottom: 200,
                backgroundColor: "green"
              }}
            />

Please help with this

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Carousel usage shown in the issue, focusing on the fixed height, renderFunction, and positioning style. Reproduce the differing text lengths and inspect the component behavior to determine whether dynamic-height or bottom-aligned items are supported; done means documenting or confirming a concrete behavior and resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.