ayanicons
67 animated icons in five styles. Any colour, and motion you can switch off.
Coming to npm soon. Until then, the icons work straight from this page: open one for its SVG.
Icons
No icon called “” yet.
In your framework
One package. A component for React and Astro, one tag for everything else, and Lottie files for apps.
npm i ayanicons
import { AyanIcon } from 'ayanicons/react';
<button>
<AyanIcon name="send" variant="duotone" /> Send
</button>
<AyanIcon name="bell" trigger="loop" color="#ff8a00" size={32} label="Notifications" />// main.ts
import 'ayanicons/element';
// vite.config.ts: vue({ template: { compilerOptions: { isCustomElement: (t) => t === 'ayan-icon' } } })
<button>
<ayan-icon name="send" variant="duotone" /> Send
</button><script>
import 'ayanicons/element';
</script>
<button>
<ayan-icon name="send" variant="duotone"></ayan-icon> Send
</button>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import 'ayanicons/element';
@Component({
selector: 'app-send',
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `<button><ayan-icon name="send" variant="duotone"></ayan-icon> Send</button>`,
})
export class SendButton {}---
import Icon from 'ayanicons/astro';
---
<button>
<Icon name="send" variant="duotone" /> Send
</button><script type="module">
import 'https://cdn.jsdelivr.net/npm/ayanicons/dist/element.js';
</script>
<button>
<ayan-icon name="send" variant="duotone"></ayan-icon> Send
</button>
<!-- or a file that loops on its own -->
<img src="node_modules/ayanicons/dist/svg-animated/color/coin.svg" width="32" alt="">Every icon ships as Lottie JSON:
ayanicons/lottie/<variant>/<name>.json
// SwiftUI (lottie-ios)
LottieView(animation: .named("coin")).playing()
// Android (lottie-android)
<com.airbnb.lottie.LottieAnimationView app:lottie_rawRes="@raw/coin" app:lottie_autoPlay="true" />
// Flutter (lottie)
Lottie.asset('assets/coin.json')
// React Native (lottie-react-native)
<LottieView source={require('ayanicons/lottie/solid/coin.json')} autoPlay />
One-colour styles are drawn in black: recolour the "primary" fill and stroke with your player's value provider.Options
Attributes on the tag, props on the React and Astro components, where stroke-width is strokeWidth.
| Option | Values | What it does |
|---|---|---|
name | 67 names, typed | Which icon. |
variant | outline, solid, duotone, color, glass | The style. Duotone, colour and glass start from each icon's own colour. |
trigger | hover, view, click, loop, none | When it moves. Hover also plays on keyboard focus, from the nearest link or button. none draws a still icon with no CSS. |
color | any CSS colour | Outline and solid follow the text colour by default. |
secondary | any CSS colour | The fill in duotone; the lighter piece in colour. |
stroke-width | number, default 3.4 | Line weight of the outline style, on a 48 grid. |
size | number or CSS length | Defaults to 1em, so it sizes with the text. |
label | text | Accessible name. Leave it out when the text beside the icon says the same. |
Motion stops for anyone who has asked their system for reduced motion. In code, renderSVG(name, options) returns the SVG as a string, and renderLottie from ayanicons/lottie returns the animation as JSON.