Watermark
Watermark adds repeated ownership or confidentiality marks behind content.
@duskmoon-dev/components/watermark Usage
When to use
- Use it when users need to scan structured content and act on individual records.
- Prefer it over ad hoc markup when the content has repeatable fields, hierarchy, or navigation state.
Implementation notes
Features
Designed for repeated or hierarchical content where users scan, compare, and inspect details.
Documents the props that control sorting, selection, expansion, pagination, or value changes where available.
Watermark is most often configured through `content`, `image`, `width`, `height`.
Renders content and generated watermark layer
Feature Demos
Feature demos are authored for the component page, then supplemented with behavior scenarios from the component test coverage.
Basic usage
Import the component stylesheet and Watermark from its package subpath, then render it with the core props.
import "@duskmoon-dev/components/styles.css";
import { Watermark } from "@duskmoon-dev/components/watermark";
export function Example() {
return (<Watermark>DuskMoon Watermark</Watermark>);
} Renders content and generated watermark layer
test-backedWatermark scenario from the component test coverage: renders content and generated watermark layer.
import "@duskmoon-dev/components/styles.css";
import { Watermark } from "@duskmoon-dev/components/watermark";
export function WatermarkRendersContentAndGeneratedDemo() {
return (<Watermark>DuskMoon Watermark</Watermark>);
} Theme aware
Docs previews inherit the DuskMoon data-theme value. Use the header switch to compare light and dark rendering.
<div data-theme="sunshine">
<Watermark>DuskMoon Watermark</Watermark>
</div>
<div data-theme="moonlight">
<Watermark>DuskMoon Watermark</Watermark>
</div> API
The API reference below lists every parsed exported type or interface for Watermark. Start with `content`, `image`, `width`, `height` for common usage.
packages/components/src/components/watermark/Watermark.types.ts
Scenarios: packages/components/src/components/watermark/Watermark.test.tsx | Prop | Type | Required | Description |
|---|---|---|---|
content | ReactNode | No | content configures Watermark. |
image | string | No | image configures Watermark. |
width | number | No | width configures Watermark. |
height | number | No | height configures Watermark. |
rotate | number | No | rotate configures Watermark. |
zIndex | number | No | zIndex configures Watermark. |
gap | [number, number] | No | gap configures Watermark. |
offset | [number, number] | No | offset configures Watermark. |
font | WatermarkFont | No | font configures Watermark. |
inherit | boolean | No | inherit configures Watermark. |
| Prop | Type | Required | Description |
|---|---|---|---|
color | string | No | color configures Watermark. |
fontSize | number | No | fontSize configures Watermark. |
fontWeight | CSSProperties["fontWeight"] | No | fontWeight configures Watermark. |
fontFamily | string | No | fontFamily configures Watermark. |
fontStyle | CSSProperties["fontStyle"] | No | fontStyle configures Watermark. |