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

emoji-slider

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

emoji-slider

A slider control using emojis

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

emoji-slider

A slider control which uses an emoji as the thumb.

This is built as a web component, so it's usable anywhere with HTML.

View live demo.

Emoji Slider

Usage

Get the compoent

npm install --save emoji-slider

Import in a JavaScript module:

import 'emoji-slider';

Or in an HTML page:

<script type="module" src="./node_module/emoji-slider/bin/emoji-slider.js"></script>

And then use it in HTML

<emoji-slider emoji="😍"></emoji-slider>

More about using web components here.

Properties

value: The numeric value of the slider between 0 and 1.

emoji: The emoji character to use in the thumb of the slider. If not set, a circular thumb is used.

step: The change in value when controlling the slider with keyboard e.g., Right Arrow Key will increate the value by 0.1. Default value of step is 0.1

Styling

The slider bar color (and active color) be styled using CSS properties. For example,

emoji-slider {
  --emoji-slider-bar-color: red;
  --emoji-slider-bar-active-color: green;
}

License

MIT License (c) Preet Shihn

Keywords

FAQs

Package last updated on 11 Feb 2019

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