Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-material-color-picker

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-material-color-picker

 Svelte Color Picker

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source


 Svelte Color Picker

Live demo.

Simple color picker made with Svelte

directly inspired from https://github.com/BennyAlex/material-design-inspired-color-picker

Svelte Kanban ## Installation
npm i svelte-material-color-picker

Usage

<script>
    import Picker from 'svelte-material-color-picker';
</script>


<Picker on:colorChanged {margin} {size} {colorsPerRow} {defaultTint} />

Props

Full list of props/bindable variables for this component:

namedefaultdescription
margin1Distance between color circles.
size50Size of the colors circles.
colorsPerRow6Number of color circles per row.
defaultTint500Default tint displayed for each colors.
selectedColor#f44336The color selected, hex code with hashtag.
modepaletteThe mode of the color picker. button mode will hide after the palette after selecting a color only showing the color circle of the selected color. palette mode with show the palette and highlight the selected color in it.
palettelink paletteThe palette used by the picker.

Events

Picker.svelte dispatches the following event:

namedetaildescription
colorChanged{ old:string, new:string }Triggers when clicking on a color picker.
<Kanban
  on:colorChanged={(e) => alert(`Color changed from ${e.detail.old} to ${e.detail.new}`)}
/>

Dev Mode

git clone https://github.com/V-Py/svelte-material-color-picker
cd svelte-material-color-picker
npm install
npm run dev

Keywords

FAQs

Package last updated on 03 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc