https://github.com/hwclass/react-battery
React component for tracking the battery status of your computer or mobile device
https://github.com/hwclass/react-battery
Last synced: 11 months ago
JSON representation
React component for tracking the battery status of your computer or mobile device
- Host: GitHub
- URL: https://github.com/hwclass/react-battery
- Owner: hwclass
- License: mit
- Created: 2016-02-01T22:10:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-04T07:34:00.000Z (over 10 years ago)
- Last Synced: 2025-07-04T06:11:27.789Z (12 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-battery
React component for tracking the battery status of your computer or mobile device
###Note: Available only on Firefox using Battery API defaultly
###Install
``` javascript
import Battery from 'Battery'
```
###Embed
Use imported src/render.js into your HTML file or write your own:
``` javascript
ReactDOM.render(;, document.getElementById('your-element-id'))
```
###[JSFiddle Example](https://jsfiddle.net/hwclass/kqjepfh4/)