Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

handlebars-helper-icon

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-icon

A helper to use packaged svg icons inline

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39
increased by1200%
Maintainers
4
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 30 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc