# WidgetProperties

## Content

[**DsPdfJS API v9.1.3**](../README)

***

[DsPdfJS API](../globals) / WidgetProperties

# Type Alias: WidgetProperties

> **WidgetProperties** = [`AnnotationBaseProperties`](AnnotationBaseProperties) & `object`

Defines properties of a [WidgetAnnotation](../classes/WidgetAnnotation).

## Type Declaration

### activate?

> `optional` **activate**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the annotation is activated.

### annotationPageClosed?

> `optional` **annotationPageClosed**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the page containing the annotation is closed
(for example, when the user navigates to the next or previous page, or follows a link annotation or outline item).

### annotationPageHide?

> `optional` **annotationPageHide**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the page containing the annotation is no longer visible in
the viewer application's user interface.

### annotationPageOpened?

> `optional` **annotationPageOpened**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the page containing the annotation is opened
(for example, when the user navigates to it from the next or previous page or by means of a link annotation
or outline item).

### annotationPageShow?

> `optional` **annotationPageShow**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the page containing the annotation becomes visible in
the viewer application's user interface.

### backColor?

> `optional` **backColor**: [`Color`](Color)

The annotation's background color.

### border?

> `optional` **border**: [`BorderProperties`](BorderProperties)

The [BorderProperties](BorderProperties) object defining annotation's border.

### buttonAppearance?

> `optional` **buttonAppearance**: [`ButtonAppearanceProperties`](ButtonAppearanceProperties)

The [ButtonAppearanceProperties](ButtonAppearanceProperties) object that specifies the look of the widget
if it is linked with a push button field.

### checkStyle?

> `optional` **checkStyle**: [`CheckStyle`](../enumerations/CheckStyle)

The style of check mark that is used if a [WidgetAnnotation](../classes/WidgetAnnotation)
is linked with a [CheckBoxField](../classes/CheckBoxField) or a [RadioButtonField](../classes/RadioButtonField).

Note that this property works over the 'buttonAppearance.Caption' property, 
for example if 'checkStyle' is "Cross",
then 'buttonAppearance.caption' will be "8".

If the value of this property is null, it indicates that ButtonAppearance.Caption
contains an unknown value.

### defaultAppearance?

> `optional` **defaultAppearance**: [`DefaultAppearanceProperties`](DefaultAppearanceProperties) \| `string`

The apperance that specifies the visual properties (font, font size etc.) used to format
the content of the annotation.
The apperance can be specified as [DefaultAppearanceProperties](DefaultAppearanceProperties) with set of properties like font, fontSize, foreColor or
as a string as it will be stored in a PDF stream: "/DF0 10 Tf 0 0 0 rg".

### enter?

> `optional` **enter**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the annotation receives the input focus.

### highlighting?

> `optional` **highlighting**: [`HighlightingMode`](../enumerations/HighlightingMode)

The annotation's highlighting mode.

### justification?

> `optional` **justification**: [`VariableTextJustification`](../enumerations/VariableTextJustification)

The justification to be used in displaying the annotation's text.
Note that if this property is not specified (the value is null) then [Field#justification](../classes/Field#justification) is used.
See PDF specification for details.

### leave?

> `optional` **leave**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the annotation loses the input focus.

### mouseDown?

> `optional` **mouseDown**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the mouse button is pressed inside the field's active area.

### mouseEnter?

> `optional` **mouseEnter**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the mouse enters the field's active area.

### mouseLeave?

> `optional` **mouseLeave**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the cursor exits the field's active area.

### mouseUp?

> `optional` **mouseUp**: [`ActionBase`](../classes/ActionBase) \| [`ActionProperties`](ActionProperties)

An action to be performed when the mouse button is released inside the field's active area.

### name?

> `optional` **name**: `string`

The name of the annotation.
If [WidgetAnnotation](../classes/WidgetAnnotation) is used with [RadioButtonField](../classes/RadioButtonField) then
'name' is used as a value.

### rotationAngle?

> `optional` **rotationAngle**: `number`

The angle, in degrees, by which the widget annotation
is rotated counterclockwise relative to the page.
The value must be a multiple of 90.
