Download the PHP package noehassiel/signature-pad without Composer

On this page you can find all versions of the php package noehassiel/signature-pad. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package signature-pad

noehassiel/signature-pad

Native signature capture for NativePHP Mobile v4. Ships a new EDGE element, <native:signature-pad>, that renders a freehand drawing surface and hands PHP the drawing as a base64-encoded PNG data URL.

Why this exists

EDGE cannot capture a signature. <native:canvas> is a declarative container for shape primitives — rects, circles, lines — with no touch-path capture and no raster export, and there is no drawing element in core or in any published plugin. That makes a signature a genuinely new element type, which is exactly what the UI component plugin mechanism is for. (The NativePHP docs use "a signature pad" as their own example of the case.)

The wire format is a plain data:image/png;base64,... string — the same thing a web <canvas> signature pad posts — so an existing server endpoint that already accepts signatures from a web form needs no changes to accept one from a phone.

Installation

From Packagist:

Or as a local path package while developing:

Then, either way:

Then rebuild — php artisan native:run ios or android. The native renderers are copied in and registered by generated code at build time, so a newly added component needs a build, not just a composer update. Adding the plugin and only restarting PHP gives you an element that serializes fine and renders nothing.

Requirements

No permissions of any kind — it draws on a surface the app already owns.

Usage

Attributes

Attribute Type Default Notes
ref string node id Stable id, required if you use capture()
_change method — Called on stroke end with the full drawing as a data URL
value string|null — An existing signature to display
pen-color string #111827 Any color the Tailwind parser accepts
stroke-width float 2.5 dp / points
read-only bool false Shows ink, ignores touches
clear-token int|string — Change it to wipe the pad
undo-token int|string — Change it to drop the last stroke

Tailwind classes on the tag are parsed by the same parser core elements use, so sizing, radius, and background need nothing from this plugin.

Emit, don't poll

_change fires on stroke end carrying the entire drawing, and that is the path to use: the screen holds the latest PNG, so a save button reads state it already has. This matters for offline work — by the time a queued write drains, the pad may be long gone, so the image has to be in the payload, not fetched later.

SignaturePad::capture() exists for the case where the control that needs the signature cannot see the pad's state (a shell-level action bar, or a sheet owning the button while a child owns the pad). Reach for it second.

Usage (JavaScript / Inertia)

The element itself is native and cannot be drawn into from a SPA frontend — what the JS module exposes is the bridge function, for pulling the drawing out of a pad a native screen is showing.

Clearing is a token, not a call

PHP has no imperative channel into a mounted view, so clear-token / undo-token are props the renderer watches: change the value and the pad reacts. It survives re-renders, needs no view handle, and cannot get out of sync with component state.

Events

Event Payload When
SignatureCaptured ref, signature, isEmpty Reply to capture()
SignatureCaptureFailed ref, reason capture() named a ref no mounted pad claims — usually the sheet closed

Stroke updates do not go through an event; they use the element's _change callback.

Always check isEmpty. A pad nobody touched still exports a valid white PNG, so a non-empty string does not mean somebody signed.

Implementation notes

Testing

The PHP half — manifest, element registration, props, callback ids — is straightforward to cover with NativePHP's component testing: render a screen containing the element and assert the published node.

The renderers themselves are native and need a real device — a simulator will draw, but confirm export size and stroke-end latency on hardware.

License

Proprietary. All rights reserved © noehassiel. See LICENSE. Redistribution, resale, or republishing of this package — in source or compiled form — is not permitted without prior written permission from the copyright holder.


All versions of signature-pad with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
nativephp/mobile Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package noehassiel/signature-pad contains the following files

Loading the files please wait ...