Sparkles icon

A free pencil-style sparkles icon, drawn by code from 1 closed shape and 2 lines. Use it as an SVG, a React component, or by name. MIT licensed.

sparkles

01Use it

Use sparkles

One package, four ways in. The icon inherits currentColor and is decorative unless you give it a title. Install it with npm i @matita/icons.

React

import { Sparkles } from '@matita/icons/react';

<Sparkles size={24} />

// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="sparkles" />

JavaScript

import { Sparkles, toSvg } from '@matita/icons';

toSvg(Sparkles, { size: 24 });   // SVG string

SVG

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" overflow="visible" class="sketch-icon sketch-icon-sparkles" data-sketch="" aria-hidden="true"><path d="M10.16 3.15Q10.72 5.89 11.69 8.5Q14.43 9.02 17.07 9.9Q14.21 10.69 11.37 11.53Q10.76 14.26 10.1 16.98Q9.49 14.17 8.44 11.5Q5.61 10.82 2.83 9.95Q5.74 9.36 8.52 8.34Q9.14 5.68 10.16 3.15Q10.35 3.76 10.51 4.38" stroke-width="1.632"/><path d="M18.09 14.16Q18.02 17.47 18 20.77" stroke-width="1.792"/><path d="M14.67 17.4Q18.04 17.24 21.42 17.45" stroke-width="1.488"/></svg>

Pencil variant

import '@matita/icons/pencil.css';
import { Sparkles } from '@matita/icons/react';

<Sparkles size={32} pencil />

The file is icons/sparkles.svg in the package (pencil/sparkles.svg for the pencil variant). Matita 0.3.0.

02How it's drawn

The recipe for sparkles

Sparkles is not stored as a drawing. It is a recipe of 1 closed shape and 2 lines on a 24 by 24 grid, and a small program draws it like a pencil would. The wobble comes from the name, so it always comes out the same.

A · Recipe
Z 10 3 11.5 8.5 17 10 11.5 11.5 10 17 8.5 11.5 3 10 8.5 8.5;
L 18 14.5 18 20.5;
L 15 17.5 21 17.5
B · Plotted
C · Drawn
How it works

03Takes, sizes, pencil

Same icon, every way

Pass a seed for another take of the same recipe. The wobble is capped, so it still reads at 16 px.

seed 0
seed 1
seed 2
seed 3
seed 4

Five seeds of sparkles. Seed 0 is the default.

16 px
20 px
24 px
32 px
48 px
96 px

True pixel sizes.

Ink
Pencil