Credit card icon
A free pencil-style credit card icon, drawn by code from 1 closed shape and 2 lines. Use it as an SVG, a React component, or by name. MIT licensed.
01Use it
Use credit-card
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 { CreditCard } from '@matita/icons/react';
<CreditCard size={24} />
// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="credit-card" />JavaScript
import { CreditCard, toSvg } from '@matita/icons';
toSvg(CreditCard, { size: 24 }); // SVG stringSVG
<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-credit-card" data-sketch="" aria-hidden="true"><path d="M2.43 5.17Q12.02 5.26 21.6 5.04Q21.08 12.06 21.56 19.07Q12.03 19.58 2.5 19.2Q2.99 12.18 2.43 5.17Q3.22 5.17 4.01 5.16" stroke-width="1.44"/><path d="M2.32 9.4Q12.17 9.62 22.03 9.61" stroke-width="1.472"/><path d="M5.36 14.9Q7.85 15.07 10.34 15.18" stroke-width="1.776"/></svg>Pencil variant
import '@matita/icons/pencil.css';
import { CreditCard } from '@matita/icons/react';
<CreditCard size={32} pencil />The file is icons/credit-card.svg in the package (pencil/credit-card.svg for the pencil variant). Matita 0.2.1.
02How it's drawn
The recipe for credit-card
Credit card is not stored as a drawing. It is a recipe of 1 closed shape and 2 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.
Z 2.5 5 21.5 5 21.5 19 2.5 19;
L 2.5 9.5 21.5 9.5;
L 6 15 10 15
credit-card as a number: 4175164797
Shapes: L line, P polyline, Z closed shape, R rectangle, C circle, E ellipse, A arc, Q curve, O dot. Separate shapes with ;. Edits stay on this page.
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.
Five seeds of credit-card. Seed 0 is the default.
True pixel sizes.