Download the PHP package dicebear/schema without Composer

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

@dicebear/schema

JSON Schema definitions for DiceBear avatar styles and options.

Schemas

This package exports two JSON Schemas (Draft 07):

definition.json

Validates avatar style definitions: the files that describe how a DiceBear avatar style is structured. A definition includes:

Only a safe subset of SVG elements and attributes is permitted. Event handlers, external URL references, and CSS injection patterns are explicitly blocked.

Additional documentation

https://www.dicebear.com/specification/definition-schema/

options.json

Validates the options object passed by users when generating an avatar. Supported properties include:

Property Type Description
seed string PRNG seed for reproducible avatars
size integer Output size in pixels (1 to 4096)
title string Accessible title rendered as <title> and aria-label
flip string \| array Mirror direction: none, horizontal, vertical, or both
scale number \| [min, max] Scaling factor (0 to 10, 1 = original size)
rotate number \| [min, max] Rotation in degrees (−360 to 360)
translateX number \| [min, max] Horizontal offset (−1000 to 1000)
translateY number \| [min, max] Vertical offset (−1000 to 1000)
borderRadius number \| [min, max] Corner radius (0 = sharp, 50 = circle)
idRandomization boolean SVG ID randomization to avoid conflicts
fontFamily string \| array Font family for text rendering
fontWeight integer \| array Font weight (1 to 1000)
*Probability number Component display probability (0 to 100)
*Variant string \| string[] \| object Component variant filter and weights
*Color string \| array Hex colors
*ColorFill string \| array Color fill: solid, linear, or radial
*ColorFillStops integer \| [min, max] Gradient color stops (min 2)
*ColorAngle number \| [min, max] Gradient angle (−360 to 360)

When an option accepts an array, the PRNG either picks from the list (for discrete values) or picks a value within the range (for numeric min/max pairs).

Usage

JavaScript

PHP

Python

Rust

The schemas are embedded at compile time and exposed as raw JSON (&'static str). Parse them with serde_json and validate with the jsonschema crate:

Go

The schemas are embedded at compile time and exposed as raw JSON (string). Parse them with encoding/json and validate with a library such as jsonschema:

Dart

The schemas are embedded as Dart string constants. Parse them with dart:convert and validate with a package such as json_schema:

CDN

The schemas are available directly via CDN, so no installation is required. We recommend using a specific version to ensure stability:

Contributing

See CONTRIBUTING.md for local development, testing, and the release process.

Sponsors

Advertisement: Many thanks to our sponsors who provide us with free or discounted products.

bunny.net


All versions of schema with dependencies

PHP Build Version
Package Version
No informations.
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 dicebear/schema contains the following files

Loading the files please wait ...