Campo de firma para Angular | ng-hub-ui-signature

Campo de firma Angular accesible que guarda trazos de ratón, táctil y lápiz como SVG escalable para formularios, con deshacer, rehacer y exportación PNG.

Referencia API

Aquí tienes el contrato completo de signature: todo lo que puedes enlazar, escuchar, proyectar y personalizar, reunido en un solo sitio. Enlaza lo que necesites y dale el estilo que quieras — es standalone y reactivo con signals.

Inputs

Ajusta signature a tu gusto con 9 inputs. Se enlazan como cualquier @Input de Angular.

NombreTipoPor defectoDescripción
labelstring''Visible field label.
formTextstring''Helper text shown below the drawing surface.
heightnumber160Logical canvas height in CSS pixels.
strokeColorstring'currentColor'Colour recorded in new SVG strokes.
strokeWidthnumber2Base width recorded in new SVG strokes.
readonlybooleanfalsePrevents drawing while preserving the signature.
controlsbooleantrueShows clear, undo and redo actions.
labelsPartial<HubSignatureLabels>{}Overrides the application-wide translated action labels for this field only.
ariaLabelstring'Signature'Accessible name for the drawing surface.

Outputs

Reacciona a lo que hace signature: 1 eventos a los que enganchar tu lógica.

NombreTipoDescripción
valueChangeEventEmitter<string>Emits the SVG value after a user-originated change.

Métodos

Controla signature desde el código — 5 métodos en su superficie programática.

NombreFirmaDevuelveDescripción
clearclear(): voidRemoves every stroke and emits the empty value.
undoundo(): voidRemoves the most recently committed stroke.
redoredo(): voidRestores the most recently undone stroke.
toSvgtoSvg(): stringReturns the scalable SVG form value.
toDataUrltoDataUrl(type?: string): stringExports the rendered signature, PNG by default.

Templates

Todavía no hay templates documentados.