Download the PHP package noehassiel/confetti without Composer

On this page you can find all versions of the php package noehassiel/confetti. 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 confetti

noehassiel/confetti

Native confetti celebrations for NativePHP Mobile v4 — a custom EDGE element, <native:confetti>, backed by Konfetti (Jetpack Compose) on Android and a hand-rolled SwiftUI particle system on iOS.

EDGE has nothing that animates hundreds of independently-moving particles, so this is a genuinely new element type rather than an arrangement of existing ones — the case the UI Component Plugin mechanism exists for.

Install

Then rebuild — php artisan native:run ios / android. A rebuild is required: renderer registration is generated at build time, so composer update alone leaves an element that serializes but renders nothing.

Usage

Place <native:confetti> last inside a <native:stack> so it layers on top of the screen content — it never intercepts touches, so nothing beneath it needs to change.

Triggering from anywhere — Confetti::burst()

fire-token is the first-choice API, for when the screen holding the element already owns the token property. When the action that should celebrate can't see it — a service class, a queued job's completion handler, a shell-level action bar acting on a child component's screen — use the facade instead:

Give the element an explicit ref if a screen has more than one, and pass the same string to burst():

burst() reaches the SAME mounted renderer fire-token would — its own _finished callback still fires once the burst ends, and it works with every preset (corners included), since it just re-triggers whatever props the element currently has. It's async like every other native call that has to reach the UI thread: if no confetti element with that ref is mounted, ConfettiBurstFailed fires instead.

One ordering caveat: "whatever props the element currently has" means whatever was last published to the device — not a change your own method makes a line earlier. A handler runs to completion before the framework re-renders and publishes anything, so this fires the OLD preset, not the new one:

Change the preset through a normal render (a :preset="$preset" binding) first, and call burst() on a later tap once that's actually on screen.

Usage (JavaScript)

<native:confetti> itself has no JavaScript equivalent — it's a compiled native view (SwiftUI on iOS, Compose on Android), not a web component, so it exists only inside NativePHP's native-UI screens. resources/js/ exists for the one piece an Inertia (Vue/React) frontend CAN reach: triggering an already-mounted element without a round trip through a Livewire action.

Listen for a missed target with the core bridge's on(), same as any other native event — the name is exported so you never hardcode the namespaced string:

Attributes

Attribute Type Default Notes
fire-token int|string Any change fires a burst. The value itself is arbitrary.
preset string burst burst | rain | cannon | explode | festive | corners
colors string[] preset palette Tailwind palette names, hex, or CSS color names
particle-count int preset
duration-ms int preset How long the burst spreads its particle spawns over
angle int (deg) preset Emission direction; 270 = straight up
spread int (deg) preset Cone width around angle; 360 = every direction
speed / max-speed float preset Random speed range per particle
damping float preset Per-frame velocity multiplier; closer to 1.0 drifts longer
position-x / position-y float 0–1 preset Emission origin, relative to the element's own bounds
time-to-live-ms int preset
fade-out bool true
_finished callback Fires once every particle from the burst has died
ref string default Target for Confetti::burst($ref) — see below

Every preset is a PHP-only concept — Confetti::resolveProps() expands it into concrete numbers before the node reaches either renderer, so the two platforms can never drift on what a preset means. An attribute you set explicitly always overrides the preset's value for that one prop.

The corners preset — converging side cannons

Most presets fire from a single point. corners is different: it fires two cannons simultaneously from the bottom-left and bottom-right corners, both angled up and inward, meeting over the top-center — the classic "confetti celebration" look.

Under the hood this rides a groups prop — a list of "x,y,angle,spread,particle_count" strings, one per simultaneous emission point — instead of the flat position-x/angle/spread attributes. It's resolved entirely in PHP (Confetti::PRESETS['corners']); both renderers read groups first and only fall back to the flat single-origin fields when it's absent, so every other preset behaves exactly as before. There's no Blade attribute for groups — it's a preset-only mechanism for now.

Rules that matter

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 confetti 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/confetti contains the following files

Loading the files please wait ...