battery-status-icon
A web component that detects and displays the current battery status as an icon. It uses Polymer 1.x and HTML5 Navigator.getBattery() API.
[ This description is mirrored from README.md at github.com/Protoss78/battery-status-icon on 2019-05-22 ]
battery-status-icon
A web component that detects and displays the current battery status as an icon. It uses Polymer 1.x and can autodetect current battery status using the new HTML5 Navigator.getBattery() API. But the battery level and charging status can also be set from the outside (e.g. in combination with Cordova and the battery plugin).
Install:
bower i battery-status-icon -S
Example:
<paper-material>
<h1>No Label</h1>
<battery-status-icon></battery-status-icon>
<battery-status-icon level="33" charging></battery-status-icon>
<battery-status-icon level="15" show-label></battery-status-icon>
<battery-status-icon level="66"></battery-status-icon>
<battery-status-icon autodetect show-label></battery-status-icon>
</paper-material>
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
- polymer#Polymer/polymer#1.9 - 2
- iron-icons#PolymerElements/iron-icons#1 - 2
- paper-tooltip#PolymerElements/paper-tooltip#1 - 2
- Released
- 2017-05-28
- Maturity
- IMPORTED
- License
- MIT License
Compatibility
- Framework
- Polymer 2.0+
- Polymer 1.0+ in 0.0.6
- Browser
- Browser Independent