Search icon

A free pencil-style search icon, drawn by code from 1 circle and 1 line. Use it as an SVG, a React component, or by name. MIT licensed.

search

01Use it

Use search

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 { Search } from '@matita/icons/react';

<Search size={24} />

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

JavaScript

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

toSvg(Search, { 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-search" data-sketch="" aria-hidden="true"><path d="M3.88 10.36C3.99 9.97 4.19 8.74 4.54 8.01C4.89 7.28 5.36 6.51 5.98 5.96C6.6 5.41 7.45 5.01 8.27 4.72C9.09 4.42 10.04 4.14 10.9 4.18C11.76 4.23 12.66 4.63 13.44 5.01C14.21 5.39 14.99 5.87 15.57 6.47C16.15 7.07 16.6 7.84 16.9 8.61C17.21 9.39 17.43 10.28 17.38 11.11C17.32 11.93 16.99 12.81 16.58 13.56C16.16 14.31 15.57 15.05 14.87 15.61C14.18 16.16 13.29 16.61 12.41 16.88C11.52 17.16 10.46 17.37 9.55 17.25C8.64 17.13 7.76 16.6 6.93 16.16C6.09 15.72 5.09 15.31 4.52 14.62C3.96 13.94 3.76 12.94 3.54 12.06C3.32 11.18 3.07 10.23 3.2 9.36C3.33 8.48 4.14 7.24 4.33 6.82" stroke-width="1.584"/><path d="M15.01 14.86Q17.66 17.39 20 20.24" stroke-width="1.632"/></svg>

Pencil variant

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

<Search size={32} pencil />

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

02How it's drawn

The recipe for search

Search is not stored as a drawing. It is a recipe of 1 circle and 1 line 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
C 10.5 10.5 6.2;
L 15.2 15.2 20 20
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 search. Seed 0 is the default.

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

True pixel sizes.

Ink
Pencil