Angular-Signaturfeld | ng-hub-ui-signature

Barrierefreies Angular-Signaturfeld, das Maus-, Touch- und Stifteingaben als skalierbare SVG-Formularwerte speichert, mit Rückgängig, Wiederholen und PNG-Export.

API-Referenz

Hier ist der vollständige Vertrag für signature: alles, was du binden, abhören, projizieren und gestalten kannst, an einem Ort gesammelt. Verdrahte, was du brauchst, und gestalte, was du willst — es ist standalone und Signals-freundlich.

Inputs

Stelle signature mit 9 Inputs ein. Binde sie wie jeden Angular-@Input.

NameTypStandardBeschreibung
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

Reagiere darauf, was signature tut — 1 Events, an die du deine Logik anknüpfen kannst.

NameTypBeschreibung
valueChangeEventEmitter<string>Emits the SVG value after a user-originated change.

Methoden

Steuere signature aus dem Code heraus — 5 Methoden auf der programmatischen Schnittstelle.

NameSignaturRückgabeBeschreibung
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

Noch keine Templates dokumentiert.