PulsoIcon

SolidJS 1.8+ · pulsoicon-solid

PulsoIcon for SolidJS

Every demo on this page is a Solid component rendered by Solid, with the icons from pulsoicon-solid. They draw exactly the same SVG as the React package and move the same way.

Install

npm install pulsoicon-solid

SolidJS 1.8 or newer. Motion (12 or newer), which plays the icons, is installed with it.

Quick start

import { Bell, Calendar, Trash2 } from "pulsoicon-solid";

export function Toolbar() {
  return (
    <>
      <button><Bell size={20} /> Notifications</button>
      <button><Calendar /> Schedule</button>
      <button><Trash2 color="crimson" strokeWidth={1.5} /> Delete</button>
    </>
  );
}

class, style and any other attribute go on the <svg>.

Live demos

Animated and static, outline and solid

<Heart />
<Heart solid />
<Heart animated={false} />
<Heart solid animated={false} />

Hover a figure to play it. The static ones don't move.

Click to play: a ref

Not saved yet

Driven by state: play

Props, live

<Heart size={48} color="#f2552c" />

Play from code

import { Check, type IconHandle } from "pulsoicon-solid";

export function SaveButton() {
  let check: IconHandle | undefined;
  return (
    <button onClick={() => check?.startAnimation()}>
      <Check ref={check} autoAnimated={false} /> Save
    </button>
  );
}

startAnimation() and stopAnimation() both return a promise that resolves when the motion has finished. Or bind a signal: <Bell autoAnimated={false} play={hasUnread()} />.

Props

PropTypeDefaultWhat it does
sizenumber | string24Width and height; numbers are pixels
colorstringcurrentColorStroke colour, and fill colour when solid
strokeWidthnumber | string2Stroke width on the 24-unit grid
absoluteStrokeWidthbooleanfalseKeep the stroke the same number of pixels at any size
solidbooleanfalseThe filled drawing instead of the outline
animatedbooleantruefalse makes the icon completely still: nothing plays it, not the ref and not play
autoAnimatedbooleantruePlay on hover / focus of the closest button, link, label or tab. false turns that off; the ref and play still work
playboolean—true plays the motion, false returns to rest

All 9,955 SolidJS icons by category

Search all icons