An add-on Meteor package for aldeed:autoform. Provides a single custom input type, "bootstrap-minicolors", which renders an input using the jquery-minicolors plugin.
Bootstrap and the plugin library must be installed separately.
In a Meteor app directory, enter:
$ meteor add twbs:bootstrap
$ meteor add hausor:autoform-bs-minicolors
$ meteor add aldeed:autoform
In a Meteor app directory, enter:
$ meteor add hausor:autoform-bs-minicolors
Specify "bootstrap-minicolors" for the type
attribute of any input. This can be done in a number of ways:
In the schema, which will then work with a quickForm
or afQuickFields
:
{
date: {
type: Date,
autoform: {
type: "bootstrap-minicolors"
}
}
}
Or on the afFieldInput
component or any component that passes along attributes to afFieldInput
:
{{> afQuickField name="typeTest" type="bootstrap-minicolors"}}
{{> afFieldInput name="typeTest" type="bootstrap-minicolors"}}
You can use custom minicolor options:
autoform: {
type: 'bootstrap-minicolors'
afFieldInput: {
minicolorsOptions: {
changeDelay: 1000,
animationSpeed: 0,
etc: 'many more options'
}
}
}
This input type is intended to be used with type: String
schema keys.
To see tests just run:
meteor test-packages --driver-package respondly:test-reporter hausor:autoform-bs-minicolors
This repo is a part of hausor.com - meteorjs app for buildind and sharing floor plans.
Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.