Trash 2 icon

A free pencil-style trash 2 icon, drawn by code from 3 lines and 2 polylines. Use it as an SVG, a React component, or by name. MIT licensed.

trash-2

01Use it

Use trash-2

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

<Trash2 size={24} />

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

JavaScript

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

toSvg(Trash2, { 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-trash-2" data-sketch="" aria-hidden="true"><path d="M3.96 6.43Q12.22 6.22 20.49 6.46" stroke-width="1.376"/><path d="M9.01 6.63Q9.44 5.36 9.69 4.03Q12.04 3.86 14.4 3.8Q14.66 5.35 15.09 6.87" stroke-width="1.6"/><path d="M6.17 6.23Q6.48 13.13 7.05 20.03Q12.12 20.07 17.18 19.86Q17.84 12.99 18.06 6.09" stroke-width="1.376"/><path d="M9.95 9.81Q10.06 13.28 10.3 16.75" stroke-width="1.488"/><path d="M14.18 9.91Q13.93 13.26 13.59 16.6" stroke-width="1.648"/></svg>

Pencil variant

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

<Trash2 size={32} pencil />

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

02How it's drawn

The recipe for trash-2

Trash 2 is not stored as a drawing. It is a recipe of 3 lines and 2 polylines 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
L 4 6.5 20 6.5;
P 9 6.5 9.5 4 14.5 4 15 6.5;
P 6 6.5 7 20 17 20 18 6.5;
L 10 10 10.3 16.5;
L 14 10 13.7 16.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 trash-2. Seed 0 is the default.

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

True pixel sizes.

Ink
Pencil