Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

react-seven-segment-display

2.1.0 • Public • Published

A Seven Segment Display Component for ReactJS

Installation

  • NPM
npm install --save react-seven-segment-display
  • Web

Download react-seven-segment-display.min.js

<script src="react-seven-segment-display.min.js"></script>

Usage

// ESM
import SevenSegmentDisplay from 'react-seven-segment-display';

// CommonJS
const SevenSegmentDisplay = require('react-seven-segment-display').default;

// Web
var SevenSegmentDisplay = window.reactSevenSegmentDisplay.default;

Props

value

  • Any Number between 0-9 in String format. Default is '0'

width

  • Number. Default is 40
  • Width of a segment

height

  • Number. Default is 5
  • Height of a segment

onColor

  • String. Default is 'rgba(255,0,0,1)'
  • Color when segment is on.

offColor

  • String. Default is 'transparent'
  • Color when segment is off.

Install

npm i react-seven-segment-display

DownloadsWeekly Downloads

1

Version

2.1.0

License

ISC

Unpacked Size

6.13 kB

Total Files

3

Last publish

Collaborators

  • avatar