Skip to content
Inputs & Forms

Signature

client48.25 kB
@stellaria/nebula-webSignatureProps

Preview

Props

21
PropTypeDefault

className

string

—

defaultValue

File | nullnull

description

ReactNode

—

disabled

booleanfalse

error

string | boolean

—

errorDisplay

ErrorDisplay"tooltip"

field

NebulaField<File | null>

—

fileName

string"signature"

format

SignatureFormat"png"

height

number180

label

ReactNode

—

labels

Partial<SignatureLabels>

—

name

string

—

onChange

((file: File | null) => void)

—

penColor

string

—

quality

number0.92

required

booleanfalse

rootClassName

string

—

size

Size"md"

strokeWidth

number2

value

File | null

—

Slot props

8

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

actionsProps

The undo and clear row.

BoxSlotProps

—

bodyProps

Wrapper for the control.

BoxSlotProps

—

canvasProps

The signature canvas. It carries the pointer handlers of the stroke, so an `onPointerDown` here replaces them; its height is written after the slot, because it comes from `height`.

Omit<DetailedHTMLProps<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, "ref">

—

descriptionProps

Help text below the label. Only rendered with `description`.

TextSlotProps

—

errorProps

Configures the `FieldError`. With `errorDisplay="tooltip"` it spreads whole; with `"text"` there is no `FieldError` to configure — it is a `Text` with `role="alert"` — and only `className` is honoured.

Omit<FieldErrorProps, "children">

—

headerProps

The label and description row. Not rendered when the field has neither.

BoxSlotProps

—

labelProps

The field label. It lands on the `<label>`, which already carries the control `htmlFor`.

TextSlotProps

—

requiredProps

The required asterisk, which lives inside the label. Only rendered with `required`.

BoxSlotProps

—

Also accepts

On top of its own props, this component forwards these groups.

Style props · 127