<state>
Declares a draw tool's own variables and starting values, read and written as $tool.* by its handlers.
<draw-tool name="stamp"
label="Stamp"
icon="approval"
@on.touch.end="$tool.count = $tool.count + 1">
<state count="0"/>
<options>
<column style="gap-8 p-12">
<text style="font-semibold">Stamp</text>
<text style="muted">Tap the page to place a stamp.</text>
</column>
</options>
</draw-tool>
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.