Skip to content

feat: add percentage detents and validate sheet props - #69

Merged
patrickmichalik merged 1 commit into
software-mansion-labs:mainfrom
DanyKrk:percentage-detents
Jul 27, 2026
Merged

feat: add percentage detents and validate sheet props#69
patrickmichalik merged 1 commit into
software-mansion-labs:mainfrom
DanyKrk:percentage-detents

Conversation

@DanyKrk

@DanyKrk DanyKrk commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Adds responsive percentage-based detents, such as '45%' and '100%', alongside existing numeric and 'content' detents.
Percentages are resolved natively against the available sheet height and update automatically when the layout changes on both
iOS and Android.

This also introduces stricter prop validation:

  • Detents must be non-empty, finite, non-negative, and use valid 0%–100% percentage syntax.
  • index must be a finite integer within the detents array.
  • Invalid values now throw descriptive JavaScript errors instead of being silently clamped.
  • Native resolved-order validation remains in place.

Documentation and example screens were expanded to cover percentage detents, invalid props, and safely updating the index when changing the detents array.

@patrickmichalik patrickmichalik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@patrickmichalik
patrickmichalik merged commit 713d4c4 into software-mansion-labs:main Jul 27, 2026
1 check passed
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.

2 participants