> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# useAnnotationButton

> **useAnnotationButton**(`props`): [`AnnotationButton`](/api/toolbar/type-aliases/annotationbutton/)

Defined in: toolbar/src/use-annotation-button.ts:301

Manages the state, keyboard shortcut and available events for an annotation
button.

Note: This hook assumes that the button triggers a dialog for inputting
the annotation value.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

## Parameters

### props

#### schemaType

[`ToolbarAnnotationSchemaType`](/api/toolbar/type-aliases/toolbarannotationschematype/)

## Returns

[`AnnotationButton`](/api/toolbar/type-aliases/annotationbutton/)