You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: provision to mask certain views #576
It would be an excellent addition for this library if it could mask certain views from the captured screenshot. Maybe some wrapper component that, when used, just renders the children as a black box.
This would be useful to prevent password/secure text inputs from being captured inside the screenshot.
Reacted by ZhangNing, aumgiri9393, sunilloharshoreline1 and JJSLIoT
Hi @JJSLIoT, sounds useful for sensitive content (password fields, payment numbers, etc.). A simple workaround today: overlay a placeholder view conditionally during capture (toggle a state right before captureRef, restore after).
A first-class API would be nice though. We'd accept a PR. One workable approach: a <MaskView> component that renders normally but exposes a flag (e.g., nativeID or a setter) that the native capture path detects and replaces with a solid rect during draw.
Labels updated: enhancement, help wanted. Leaving open.
The implementation adds a cross-platform MaskView component, using an internal nativeID marker detected by the Android and iOS capture paths to replace the marked content with a solid mask during capture.
I've also included tests and README documentation.
The PR is currently awaiting maintainer approval for GitHub Actions workflows. Would appreciate your feedback when you get a chance. Thank you!
Activity
gre commentedon May 1, 2026
Hi @JJSLIoT, sounds useful for sensitive content (password fields, payment numbers, etc.). A simple workaround today: overlay a placeholder view conditionally during capture (toggle a state right before
captureRef, restore after).A first-class API would be nice though. We'd accept a PR. One workable approach: a
<MaskView>component that renders normally but exposes a flag (e.g.,nativeIDor a setter) that the native capture path detects and replaces with a solid rect during draw.Labels updated:
enhancement,help wanted. Leaving open.bhumikabiyani commentedon Nov 14, 2026
Hi @gre, I came across this feature request and noticed your suggestion for a first-class
<MaskView>API.I've opened #764 implementing this approach.
The implementation adds a cross-platform
MaskViewcomponent, using an internalnativeIDmarker detected by the Android and iOS capture paths to replace the marked content with a solid mask during capture.I've also included tests and README documentation.
The PR is currently awaiting maintainer approval for GitHub Actions workflows. Would appreciate your feedback when you get a chance. Thank you!