Gift icon

Added in v0.2.0

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

gift

01Use it

Use gift

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

<Gift size={24} />

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

JavaScript

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

toSvg(Gift, { 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-gift" data-sketch="" aria-hidden="true"><path d="M3.37 7.82Q12 8.37 20.63 7.88Q20.55 9.92 20.35 11.94Q11.95 11.92 3.56 12.02Q3.28 9.93 3.37 7.82Q4.2 7.84 5.03 7.83" stroke-width="1.392"/><path d="M4.79 11.5Q5.05 16 5.07 20.51Q11.97 20.23 18.86 20.47Q18.82 16.01 19.1 11.56" stroke-width="1.488"/><path d="M12.13 7.65Q11.72 14.29 12.01 20.93" stroke-width="1.824"/><path d="M11 7.46C10.85 7.5 10.43 7.65 10.14 7.71C9.85 7.76 9.54 7.79 9.23 7.79C8.92 7.79 8.56 7.8 8.27 7.72C7.98 7.64 7.71 7.47 7.5 7.3C7.29 7.13 7.14 6.92 7.01 6.71C6.88 6.5 6.77 6.27 6.74 6.04C6.71 5.8 6.74 5.54 6.83 5.31C6.93 5.08 7.09 4.83 7.3 4.64C7.52 4.45 7.83 4.31 8.12 4.17C8.42 4.04 8.74 3.89 9.08 3.84C9.42 3.79 9.79 3.84 10.14 3.88C10.49 3.93 10.89 3.97 11.19 4.1C11.48 4.24 11.7 4.48 11.91 4.7C12.13 4.91 12.35 5.14 12.47 5.4C12.58 5.65 12.6 5.95 12.58 6.22C12.57 6.5 12.51 6.81 12.35 7.06C12.2 7.31 11.92 7.54 11.64 7.74C11.37 7.94 10.87 8.17 10.72 8.25" stroke-width="1.712"/><path d="M15.24 4.34C15.39 4.38 15.89 4.45 16.16 4.57C16.43 4.69 16.69 4.87 16.86 5.06C17.04 5.25 17.14 5.48 17.21 5.71C17.27 5.94 17.29 6.19 17.24 6.42C17.19 6.66 17.07 6.92 16.88 7.13C16.7 7.34 16.42 7.54 16.13 7.68C15.84 7.83 15.49 7.95 15.14 8.02C14.79 8.1 14.4 8.14 14.03 8.12C13.66 8.11 13.26 8.05 12.92 7.93C12.58 7.81 12.26 7.61 12.01 7.4C11.76 7.19 11.55 6.93 11.43 6.66C11.31 6.39 11.28 6.08 11.3 5.79C11.32 5.5 11.39 5.18 11.55 4.91C11.72 4.64 11.98 4.36 12.28 4.16C12.58 3.95 12.96 3.77 13.34 3.65C13.73 3.53 14.16 3.46 14.58 3.43C15.01 3.41 15.68 3.51 15.9 3.52" stroke-width="1.392"/></svg>

Pencil variant

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

<Gift size={32} pencil />

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

02How it's drawn

The recipe for gift

Gift is not stored as a drawing. It is a recipe of 1 closed shape, 1 polyline, 1 line and 2 ellipses 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 3.5 8 20.5 8 20.5 12 3.5 12;
P 5 12 5 20.5 19 20.5 19 12;
L 12 8 12 20.5;
E 9.5 6 2.5 1.8;
E 14.5 6 2.5 1.8
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 gift. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

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

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

True pixel sizes.

Ink
Pencil