Pill icon

New Added in v0.4.0

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

pill

01Use it

Use pill

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

<Pill size={24} />

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

JavaScript

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

toSvg(Pill, { 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-pill" data-sketch="" aria-hidden="true"><path d="M10.76 18.11C10.58 18.28 10.08 18.89 9.66 19.1C9.24 19.3 8.71 19.31 8.22 19.36C7.73 19.4 7.17 19.53 6.73 19.38C6.28 19.23 5.9 18.8 5.55 18.45C5.2 18.1 4.81 17.71 4.64 17.26C4.46 16.82 4.47 16.26 4.5 15.77C4.54 15.28 4.63 14.75 4.85 14.31C5.06 13.87 5.62 13.3 5.78 13.1" stroke-width="1.44"/><path d="M13.33 5.93C13.51 5.77 13.97 5.17 14.38 4.95C14.79 4.73 15.3 4.67 15.79 4.61C16.27 4.56 16.81 4.49 17.27 4.63C17.74 4.76 18.22 5.08 18.57 5.43C18.92 5.78 19.2 6.26 19.36 6.73C19.53 7.2 19.61 7.75 19.55 8.23C19.49 8.7 19.25 9.17 19.03 9.61C18.8 10.04 18.35 10.65 18.21 10.86" stroke-width="1.744"/><path d="M10.47 18.58Q14.27 14.01 18.78 10.14" stroke-width="1.504"/><path d="M5.14 13.65Q9.69 9.46 13.99 5.03" stroke-width="1.744"/><path d="M9.16 9.19Q12.03 11.79 14.59 14.7" stroke-width="1.488"/></svg>

Pencil variant

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

<Pill size={32} pencil />

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

02How it's drawn

The recipe for pill

Pill is not stored as a drawing. It is a recipe of 2 arcs and 3 lines 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
A 8 16 3.5 45 225;
A 16 8 3.5 225 405;
L 10.5 18.5 18.5 10.5;
L 5.5 13.5 13.5 5.5;
L 9.5 9.5 14.5 14.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 pill. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

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

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

True pixel sizes.

Ink
Pencil