Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Repository files navigation

Color Picker Bundle

Build StatusSensioLabsInsightStyleCICoverage Status

Adds Color Picker Form Type to Symfony.

Built on top of tinyColorPicker.

Documentation

Installation

1. Add to composer.json to the require key

composer require kunicmarko/color-picker-bundle

2. Register the bundle in app/AppKernel.php

$bundles = array(
// ...
new KunicMarko\ColorPickerBundle\ColorPickerBundle(),
);

3. Install assets

app/console assets:install

How to use

In your form you can add it like:

// Symfony 2.8 and newer versions
use KunicMarko\ColorPickerBundle\Form\Type\ColorPickerType;
$builder->add('field', ColorPickerType::class);

At the end of your body/layout add:

<script type="text/javascript" src="{{ asset('bundles/colorpicker/js/jqColorPicker.min.js') }}"></script>
<script type="text/javascript">
$('.colorpicker').colorPicker();
</script>

About

ColorPicker Form Type for Symfony

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages