@gfazioli/mantine-led
A highly customizable LED indicator component for React applications built with Mantine. Provides visual feedback for status indicators with support for colors, sizes, animations, and controlled states.
Installation
After installation import package styles at the root of your application:
You can import styles within a layer @layer mantine-led by importing @gfazioli/mantine-led/styles.layer.css file.
Usage
Explore all available props and see the component in action:
Controlled
The Led component is fully controlled through the value prop. Here's an example of controlling the LED state:
Colors
The Led component supports all Mantine theme colors. Use the color prop to set the LED color:
Animations
Add visual feedback with built-in animations. The component supports multiple animation types:
- pulse: Smooth pulsing effect (default)
- flash: Quick flashing
- breathe: Slow breathing effect
- blink: Regular blinking
- glow: Glowing effect with increased intensity
Pulse
Flash
Breathe
Blink
Glow
Labels
Add descriptive labels to your LED indicators with full customization support:
The label prop accepts any React node, allowing you to use custom components like badges, icons, or formatted text. Use labelPosition to control whether the label appears on the left or right side of the LED.
Styles API
Led supports Styles API, you can add styles to any inner element of the component with classNames prop. Follow Styles API documentation to learn more.
You can customize the appearance of the Led component using the Styles API. This allows you to modify styles for various parts of the component, such as the root, led, and label.
Component Styles API
Hover over selectors to highlight corresponding elements
Use Cases
System Status Panel
Monitor multiple system components with organized LED indicators:
System Status Panel
Network
Services
Resources
Security
DEFCON Alert System
A fun example showing how to build a DEFCON (Defense Readiness Condition) alert system with animated LEDs:
Defense Readiness Condition
DEFCON 5
Normal readiness
DEFCON 4
Increased intelligence watch
DEFCON 3
Increase in force readiness
DEFCON 2
Further increase in force readiness
DEFCON 1
Maximum force readiness