DocMosaicdocs
Primitives

Editor.BrushWeightSlider

Drawing-mode slider that controls stroke width.

Drawing-mode slider that controls stroke width.

Usage

import { Editor } from '@docmosaic/react';

<Editor.Root>
    <Editor.BrushWeightSlider />
</Editor.Root>;

API Reference

PropTypeDefaultDescription
value *number-

Active brush weight in PDF points (1-20).

onChange *(weight: number) => void-

Fired when the user moves the slider.

minnumber | undefined-

Optional minimum weight. Defaults to 1.

maxnumber | undefined-

Optional maximum weight. Defaults to 20.

previewColorstring | undefined-

Optional preview color used by the swatch. Defaults to current weight color.

classNamestring | undefined--
  • Root - the orchestrator