symbolist

πŸ”£ A collection of every symbol from SF Symbols.

MIT License

Downloads
19
Stars
22
Committers
2

πŸ”£ A collection of every symbol from SF Symbols.

  • πŸ€– Automated: Authored and updated automatically
  • πŸ§ͺ Reliable: Fully tested with 100% code coverage
  • πŸ“¦ Typed: Written in TypeScript and includes definitions out-of-the-box
  • πŸ’¨ Zero dependencies

Introduction

SF Symbols is a library of iconography from Apple, integrated into the San Francisco system fonts.

Installation

npm install symbolist

Usage

symbols

Import symbols.

import { symbols } from "symbolist"

// symbols: {"0.circle": "τ€€Έ", "0.circle.fill": "τ€€Ή", ...}

getSymbol

Import getSymbol.

import { getSymbol } from "symbolist"

Given a symbol name, getSymbol will return its symbol (or undefined for unknown symbols).

const symbol = getSymbol("scribble.variable")

// symbol: "􀀑"

getSymbolName

Import getSymbolName.

import { getSymbolName } from "symbolist"

Given a symbol, getSymbolName will return its name (or undefined for unknown symbols).

const name = getSymbolName("τ€£³")

// name: "lasso.and.sparkles"

Automation

Symbols are extracted with the generate commandβ€”using the SF Symbols app.

Types

generate prepares types along its symbols which means getSymbol and getSymbolName will validate symbol names when using TypeScript.

Versioning

This package follows SF Symbols' versioning for major and minor versions.