Skip to content

Conversation

@alwaysintune
Copy link
Contributor

@alwaysintune alwaysintune commented Nov 5, 2025

Description

Adds a new counterContainerStyle prop to the Carousel component to allow customization of the counter container's styling. This complements the existing counterTextStyle prop by enabling developers to adjust the counter container's appearance (margins, padding, positioning, background, etc.) while counterTextStyle continues to control the text styling inside the counter.

Changelog

Carousel - Added counterContainerStyle prop (StyleProp) to customize the counter container's style. This allows adjusting margins, padding, positioning, and other visual properties of the counter container when showCounter is enabled.

Additional info

This enhancement provides more flexibility for customizing the counter appearance, particularly useful for adjusting margins and positioning to match different design requirements or layouts.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

✅ PR Description Validation Passed

All required sections are properly filled out:

  • Description
  • Changelog
  • Additional info

Your PR is good for review! 🚀


This validation ensures all sections from the PR template are properly filled.

Copy link
Contributor

@adids1221 adids1221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alwaysintune, I left a small comment about the naming convenience of the prop name.

Since it's only for the counter container, I think counterContainerStyle is better naming here and creates a clear separation between the container and the text styling.

alwaysintune and others added 3 commits November 10, 2025 10:29
Co-authored-by: Adi Mordo <adids1221@gmail.com>
Co-authored-by: Adi Mordo <adids1221@gmail.com>
Co-authored-by: Adi Mordo <adids1221@gmail.com>
@alwaysintune alwaysintune enabled auto-merge (squash) November 10, 2025 08:30
/**
* the counter's container style
*/
counterContainerStyle?: StyleProp<ViewStyle>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alwaysintune @adids1221
Generally, we should avoid adding styles for each view in the hierarchy.
Let's try to find a solution that solves the issue without an additional prop.
Please open a ticket if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the only solution to add margin to the right

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To elaborate more - currently counter has an absolute position. Absolute position forces item design to conform, fill the full width, whilst carousel is written with use cases in mind, so a lot of props can't be used together (i. e. loop and item spacings).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixing with banners leads to cases where it would be best to have a different position for counter because it conflicts with dismiss x action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants