Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.

npm/handlebars-helper-icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

handlebars-helper-icon

A helper to inline svg icons efficiently

Use

Register this module as a handlebars helper, and then you can load SVG icons from packages.

In your template:

<div class='thing'>
    {{icon "somepackage/test.svg" width="109"}}
</div>
<div class='someotherplace'>
    {{icon "somepackage/test.svg" width="22"}}
</div>

The SVG will be inlined as a symbol, and all further uses on a page will only have a small <use> element referring to the definition.

This module only works for server-side rendering, though contributions to add browser support are welcome.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published