@evicons/svg
Website: evicons.dev
Raw SVG files, an SVG sprite and metadata for EVicons, an MIT-licensed icon library for e-mobility and EV charging.
All files are generated from the sources in icons/ of the repository. Do not edit them by hand.
Usage
<img src="node_modules/@evicons/svg/svg/<name>.svg" alt="" />
Icons use currentColor and contain no fixed colours. Inline the SVG (or use the sprite) to colour it with CSS.
Sprite:
<svg width="24" height="24"><use href="sprite.svg#evicon-<name>" /></svg>
Map markers (marker-*.svg) can be drawn filled because their first <path> is the pin. Page CSS cannot reach into the sprite, so for filled markers inline the SVG or fill the SVG string before you use it as an image; see Map markers in the repository README.
Metadata (names, categories, meanings, tags, aliases) is in icons.json:
import icons from '@evicons/svg/icons.json' with { type: 'json' }
OpenStreetMap tags (amenity=charging_station, socket:<type>=<count>, ...) map to icons in osm.json, an object from tag to icon name; the same tags are in the osm field of icons.json. A bare key such as socket:type2 stands for any value, key=value for that value only. See OpenStreetMap in the repository README for the full table and examples:
import osm from '@evicons/svg/osm.json' with { type: 'json' }
osm['socket:type2_combo'] // 'plug-ccs2'
OCPI values (OCPI 2.2.1 and 2.3.0, Locations module) map to icons in ocpi.json, an object from <Object>.<field>=<VALUE> to icon name; the same values are in the ocpi field of icons.json. See OCPI in the repository README for the full table and an example:
import ocpi from '@evicons/svg/ocpi.json' with { type: 'json' }
ocpi['Connector.standard=IEC_62196_T2_COMBO'] // 'plug-ccs2'
ocpi['EVSE.status=CHARGING'] // 'status-occupied'
License
MIT