import { Story, Meta, html } from '@open-wc/demoing-storybook';
import './icons/iconset-bugs.js';
import './icons/iconset-misc.js';
import * as spaceSet from './icons/iconset-space.js';
import '../lion-icon.js';
import './icon-resolvers.js';
# Icon
A web component for displaying icons.
{html`
`}
```html
```
## How to use
### Installation
```sh
npm i --save @lion/icon
```
```js
import '@lion/icon/lion-icon.js';
```
### Icon sets
Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance.
See the system documentation to learn more about icon sets.
{html`
${Object.keys(spaceSet).map(
name => html`
${name}
`
)}
`}
```html
```
If for some reason you don't want to lazy load icons, you can still import and use them
synchronously.
### Accessibility
It is recommended to add an `aria-label` to provide information to visually impaired users:
A `lion-icon` without an `aria-label` attribute will be automatically given an `aria-hidden` attribute.
{html`
`}
```html
```
### Styling
By default, a `lion-icon` will be `1em` × `1em` (the current line-height).
`lion-icon` uses SVGs and may be styled with CSS, including using CSS properties such as `fill`:
{html`
`}
```html
```
See SVG and CSS on MDN web docs for more information.