Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
index.js
readme.js
readme.styl
test.html
test.js

README.md

Sprite

The Sprite component produces an inline svg that contains symbols which can be referred to by other components.

You should include the tonic-sprite once, somewhere in the body, but before other components that use it.

HTML

<tonic-sprite></tonic-sprite>

To use a symbol from another component, you can refer to the symbol by its id property, for example...

JS

class MyComponent extends Tonic {
  render () {
    return this.html`
      <tonic-icon symbol-id="close" size="40px"></tonic-icon>
    `
  }
}
You can’t perform that action at this time.