Truck icon

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

truck

01Use it

Use truck

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

<Truck size={24} />

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

JavaScript

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

toSvg(Truck, { 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-truck" data-sketch="" aria-hidden="true"><path d="M5.35 17.91Q3.89 17.82 2.42 17.85Q2.63 11.75 2.59 5.64Q8.32 5.44 14.05 5.55Q13.66 11.84 13.84 18.14Q11.29 18.18 8.75 18" stroke-width="1.744"/><path d="M13.73 8.82Q15.87 9.05 18.02 9.09Q19.64 10.74 20.94 12.64Q20.93 15.37 21.03 18.09Q19.64 18.15 18.27 17.98" stroke-width="1.392"/><path d="M5.16 17.27C5.22 17.16 5.35 16.8 5.5 16.61C5.65 16.42 5.86 16.26 6.07 16.13C6.29 16.01 6.53 15.9 6.78 15.84C7.03 15.78 7.32 15.74 7.57 15.8C7.82 15.85 8.05 16.04 8.28 16.19C8.51 16.34 8.78 16.48 8.94 16.7C9.11 16.92 9.19 17.22 9.27 17.5C9.35 17.78 9.44 18.09 9.42 18.38C9.4 18.67 9.28 18.98 9.14 19.24C9 19.51 8.8 19.76 8.58 19.96C8.35 20.16 8.08 20.32 7.8 20.44C7.52 20.56 7.2 20.67 6.88 20.69C6.57 20.7 6.22 20.64 5.93 20.52C5.63 20.4 5.34 20.2 5.09 19.98C4.84 19.76 4.58 19.5 4.43 19.2C4.28 18.9 4.22 18.53 4.2 18.18C4.17 17.84 4.2 17.47 4.28 17.14C4.37 16.8 4.64 16.33 4.71 16.16" stroke-width="1.6"/><path d="M18.98 18.4C18.95 18.51 18.89 18.88 18.77 19.08C18.66 19.29 18.46 19.47 18.27 19.62C18.07 19.77 17.84 19.89 17.59 19.98C17.35 20.07 17.08 20.15 16.82 20.14C16.56 20.14 16.27 20.07 16.03 19.97C15.78 19.86 15.54 19.71 15.34 19.53C15.15 19.35 14.98 19.12 14.87 18.88C14.76 18.64 14.7 18.36 14.68 18.1C14.65 17.83 14.66 17.55 14.73 17.29C14.81 17.03 14.94 16.76 15.12 16.54C15.29 16.32 15.52 16.13 15.76 15.98C16.01 15.83 16.29 15.71 16.58 15.64C16.86 15.57 17.2 15.51 17.49 15.55C17.78 15.6 18.06 15.76 18.33 15.91C18.61 16.05 18.92 16.2 19.12 16.42C19.32 16.65 19.44 16.96 19.54 17.25C19.63 17.54 19.7 17.86 19.69 18.17C19.68 18.47 19.52 18.94 19.49 19.09" stroke-width="1.808"/></svg>

Pencil variant

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

<Truck size={32} pencil />

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

02How it's drawn

The recipe for truck

Truck is not stored as a drawing. It is a recipe of 2 polylines and 2 circles 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
P 5 18 2.5 18 2.5 5.5 14 5.5 14 18 9 18;
P 14 9 18 9 21 12.5 21 18 19 18;
C 7 18 2;
C 17 18 2
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 truck. Seed 0 is the default.

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

True pixel sizes.

Ink
Pencil