Skip to main content

Interface: CaptureOptions

Defined in: packages/uimatch-core/src/types/adapters.ts:8

Configuration options for capturing a web page element.

Properties

basicAuth?

optional basicAuth: object;

Defined in: packages/uimatch-core/src/types/adapters.ts:50

HTTP Basic Authentication credentials.

password

password: string;

username

username: string;

childSelector?

optional childSelector: string;

Defined in: packages/uimatch-core/src/types/adapters.ts:28

Optional: child element inside selector to use for Figma child-node mapping. Supports CSS, dompath, role, testid, and text selectors.


detectStorybookIframe?

optional detectStorybookIframe: boolean;

Defined in: packages/uimatch-core/src/types/adapters.ts:56

Auto-detect and use Storybook iframe (/iframe.html).

Default

true

dpr?

optional dpr: number;

Defined in: packages/uimatch-core/src/types/adapters.ts:40

Device pixel ratio.

Default

2

fontPreloads?

optional fontPreloads: string[];

Defined in: packages/uimatch-core/src/types/adapters.ts:45

Font URLs to preload before capture.


html?

optional html: string;

Defined in: packages/uimatch-core/src/types/adapters.ts:17

HTML content to render (mutually exclusive with url).


idleWaitMs?

optional idleWaitMs: number;

Defined in: packages/uimatch-core/src/types/adapters.ts:83

Additional idle wait after networkidle (ms).

Default

150

maxChildren?

optional maxChildren: number;

Defined in: packages/uimatch-core/src/types/adapters.ts:62

Maximum child elements to collect styles from.

Default

200

maxDepth?

optional maxDepth: number;

Defined in: packages/uimatch-core/src/types/adapters.ts:77

Maximum depth to traverse for child elements.

Default

6

propsMode?

optional propsMode: "default" | "extended" | "all";

Defined in: packages/uimatch-core/src/types/adapters.ts:71

CSS properties to collect.

  • default: A curated list of common properties.
  • extended: default + additional layout and visual properties.
  • all: All computed styles.

Default

'extended'

reuseBrowser?

optional reuseBrowser: boolean;

Defined in: packages/uimatch-core/src/types/adapters.ts:90

Reuse shared Playwright browser via browserPool. Improves performance for repeated comparisons (e.g., in /loop).

Default

false

selector

selector: string;

Defined in: packages/uimatch-core/src/types/adapters.ts:22

CSS selector to locate the target element.


url?

optional url: string;

Defined in: packages/uimatch-core/src/types/adapters.ts:12

URL to navigate to (mutually exclusive with html).


viewport?

optional viewport: object;

Defined in: packages/uimatch-core/src/types/adapters.ts:34

Viewport dimensions.

height

height: number;

width

width: number;

Default

{ width: 1440, height: 900 }