Search icon

Added in v0.1.0

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.96 4.2 8.72 4.56 7.98C4.92 7.24 5.4 6.46 6.03 5.91C6.67 5.36 7.54 4.97 8.38 4.68C9.21 4.4 10.18 4.13 11.05 4.19C11.92 4.26 12.82 4.68 13.6 5.09C14.38 5.49 15.15 6 15.71 6.63C16.28 7.25 16.71 8.06 16.98 8.85C17.25 9.64 17.44 10.56 17.34 11.39C17.25 12.22 16.87 13.1 16.4 13.84C15.94 14.58 15.29 15.3 14.56 15.83C13.82 16.35 12.9 16.76 11.98 16.98C11.06 17.21 9.98 17.36 9.06 17.18C8.15 17 7.3 16.4 6.49 15.9C5.68 15.4 4.71 14.9 4.2 14.17C3.68 13.44 3.56 12.41 3.42 11.51C3.28 10.6 3.12 9.62 3.34 8.75C3.56 7.88 4.5 6.7 4.73 6.29" 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.7.0.

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.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

search from exact shapes (wobble 0) to the full hand (wobble 1, the default). The exact version is also a ready-made file: exact/search.svg.

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

True pixel sizes.

Ink
Pencil