Command palette

@yasinsensoy/native

React Native · Components

Watermark

Watermark: tiles a tilted, repeating text or logo over the content (same pattern and measurements as web, @yasinsensoy/core/watermark).

2 exports

Live example

The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.

Preview

Q4 Finance Report

In the fourth quarter revenue grew 18% over the previous quarter. The biggest contribution came from business subscriptions; on the personal side the refund rate fell to 2.1%.

The goal for next quarter is to grow the sales team in new regions and renew the payment infrastructure. Detailed tables are attached.

Code

import { Watermark } from "@yasinsensoy/native";

<Watermark content={["CONFIDENTIAL","[email protected]"]}>
  <article>…</article>
</Watermark>

Events

  1. Events appear here when you interact with the preview.

Import

import { Watermark } from "@yasinsensoy/native";

Watermark

component

Watermark: tiles a tilted, repeating text or logo over the content (same pattern and measurements as web, @yasinsensoy/core/watermark). For confidential document previews, drafts, test environments, photo previews before purchase.

  • Does not block touches: the layer is pointerEvents="none"; the content below scrolls and can be pressed. Screen readers do not read the watermark.
  • Theme aware: without a color it uses the theme's text color and follows theme changes.
  • Only as many marks as needed to fill the visible area are drawn; it re-tiles when the size changes (rotation, foldable screen).
Watermark({ children, fullscreen, zIndex, style, layerStyle, ...options }: WatermarkProps): JSX.Element

Examples

<Watermark content={["CONFIDENTIAL", user.email]}>
  <Report />
</Watermark>
<Watermark fullscreen content="TEST ENVIRONMENT" color={colors.destructive} opacity={0.08} />

Props of the Watermark component (same names as web).

NameTypeDefaultDescription
children?ReactNodeContent to watermark.
fontWeight?FontWeightInput500Font weight.
color?stringthe theme `foreground` (follows theme changes)Text color.
opacity?number0.12Opacity (0–1).
fullscreen?booleanDraws as a layer covering the whole containing view (no children needed); placed at the screen root it covers the whole screen (e.g. "TEST ENVIRONMENT").
zIndex?number10` (`50` with `fullscreen`)The layer's zIndex.
style?StyleProp<ViewStyle>Style of the container.
layerStyle?StyleProp<ViewStyle>Style of the watermark layer.
content?string | readonly string[]Text; with an array each item is a separate line (e.g. ["CONFIDENTIAL", "[email protected]"]).
image?stringAn image (logo) instead of text; tiled with its own colors at opacity transparency.
imageWidth?number120Image width.
imageHeight?numberimageWidth` (square)Image height.
rotate?number-22Tilt (degrees).
gap?readonly [number, number][100, 100]Gap between patterns [horizontal, vertical].
fontSize?number16Font size.
stagger?booleantrueOffsets rows like bricks.