How to use the @simonwep/pickr function in @simonwep/pickr

To help you get started, we’ve selected a few @simonwep/pickr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ovanta / vue-cloudfront / src / vue / ui / input / Pickr.vue View on Github external
mounted() {
            this.pickr = new Pickr({
                el: this.$refs.pickr,
                lockOpacity: true,
                default: this.color,
                theme: 'nano',

                swatches: this.$config.predefinedColors,
                defaultRepresentation: 'HEXA',
                components: {

                    // Main components
                    preview: true,
                    hue: true,

                    // Input / output Options
                    interaction: {
                        input: true,
github cruise-automation / webviz / packages / webviz-core / src / components / ColorPicker.js View on Github external
useLayoutEffect(() => {
    if (!container.current) {
      throw new Error("missing container element");
    }
    pickr.current = new Pickr({
      el: container.current,

      // Pickr internally calls setColor() after initialization, so if our setColor
      // happens too early it will be overridden by the default color
      default: colorRef.current,

      theme: "monolith",
      useAsButton: true,
      comparison: false,
      lockOpacity: true,
      components: {
        preview: false,
        hue: true,
        interaction: {
          input: true,
        },
github Sn8z / Poddr / src / app / settings / settings.component.ts View on Github external
private initPickr = () => {
		this.pickr = new Pickr({
			el: '.clr-pickr',
			default: '#00FFAA',
			theme: 'classic',
			lockOpacity: true,
			components: {
				preview: true,
				opacity: true,
				hue: true,
				interaction: {
					input: true,
					save: true
				}
			}
		});
		this.pickr.on('init', instance => {
			this.pickr.setColor(this.store.get("color", "#FF9900"));
github Kooboo / Kooboo / Kooboo.Web / kooboo-web-editor / src / components / common / colorPicker.ts View on Github external
setTimeout(() => {
    const pickr = new Pickr({
      el: picker,
      theme: "nano",
      default: old,
      autoReposition: false,
      components: {
        preview: true,
        opacity: true,
        hue: true,
        interaction: {
          cancel: true,
          save: true
        }
      },
      strings: {
        save: TEXT.OK,
        cancel: TEXT.CANCEL

@simonwep/pickr

Flat, Simple, Hackable Color-Picker.

MIT
Latest version published 8 months ago

Package Health Score

74 / 100
Full package analysis