Download the PHP package el-schneider/statamic-choices without Composer

On this page you can find all versions of the php package el-schneider/statamic-choices. 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 statamic-choices

Statamic Choices

Help editors make better decisions. Turn radios and checkboxes into visual choice cards.

A plain radio group asks editors to pick a word. Choices lets you show what they're actually picking — an image, a description, or trusted custom HTML when words won't cut it.

Features

Requirements

Installation

Usage

Add a Choices field to your blueprint and configure the available options.

Single choice

Saved value:

Multiple choices

Saved value:

Configuration Reference

Field settings

Setting Values Default Description
mode single, multiple single Whether the field behaves like radios or checkboxes.
variant content, image content Content cards show labels/text. Image cards use full-bleed images.
card_width 100, 50, 33, 25, 20 100 Approximate card width before wrapping.
image_aspect 1/1, 4/3, 16/9 1/1 Image card aspect ratio. Only used by variant: image.
default scalar or YAML array Default selected value(s).

Option settings

Setting Description
value Stored value. Must be unique.
label Human-readable label shown in the control panel and augmented output. Falls back to value.
image Optional Statamic asset. Use normal asset IDs like assets::cards/basic.svg.
description Optional supporting text for content cards.
use_html Enables trusted custom HTML for content cards. When enabled, HTML replaces image and description.
html Trusted HTML rendered inside the card. No Antlers rendering.

Custom HTML

Content cards can swap their image and description for trusted custom HTML. Intended for blueprint configuration — not editor input. No Antlers.

Labels and selection controls stay under fieldtype control.

Image Cards

Image cards are useful for visual presets, colorways, layouts, or other choices where the image is the interface.

In image mode, labels are used for tooltips and accessible names. Descriptions and custom HTML are ignored.

Frontend Usage

The field stores only selected values. When augmented, it returns the selected option data.

Single mode

Augmented shape:

Multiple mode

Multiple selections are returned in the option order from the blueprint.

Notes

Development

License

MIT


All versions of statamic-choices with dependencies

PHP Build Version
Package Version
Requires statamic/cms Version ^5.0 || ^6.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 el-schneider/statamic-choices contains the following files

Loading the files please wait ...