@yulian21/react-seven-seg-display
v1.0.0
Published
Seven-segment React component with width-driven CSS variables.
Maintainers
Readme
React Seven Segment
A customizable React component library for rendering seven-segment digital displays.
Features
- Render seven-segment displays in React
- Customizable segment colors (on/off) and sizes
- Supports numbers and limited characters
- Easy integration into any React project
Installation
npm install react-seven-segUsage
import SevenSegment from 'react-seven-seg';
function App() {
return (
<SevenSegment
value="1234"
colorOn="red"
colorOff="#330000"
size={48}
/>
);
}Props
| Prop | Type | Default | Description | |----------|--------|-----------|---------------------------------------------| | value | string | | Value to display | | colorOn | string | 'red' | Color of illuminated segments | | colorOff | string | '#330000' | Color of non-illuminated segments | | size | number | 40 | Height of each digit in pixels |
Author
Yulian Symkanynets
