2.0.6 • Published 1 year ago

@cloudparker/easy-color-picker-svelte v2.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

easy-color-picker

Implement this simple and lightweight color picker specifically for Svelte without any dependencies, maintaining a small package footprint. Easily obtain the color value by utilizing the on:change event for the picker. Simply add it to any component. It will work well on mobile devices also.

Install

npm install @cloudparker/easy-color-picker-svelte -D

Screenshot

Sample

<script lang="ts">
	import EasyColorPicker from '@cloudparker/easy-color-picker-svelte';
	//...

	const handleColor = (color:string) => {
		console.log(color);
	};
</script>

<EasyColorPicker 
color="#ff0000" 
onColor={handleColor} 
colorPalletes={['#f57f17', '#00c853', '#00bfa5', '#2962ff']}
>
</EasyColorPicker>

Demo

NA

Props

color: string

default: #0000ff Bind the color value in hex format.

colorPalletes: string[]

Set colors for quick access, can set max 4 colors into it.

Events

onColor Tigger with the color value rgb or rgba or hex format when color changed.

2.0.3

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.4.0

2 years ago

1.3.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.3.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago