This package has been deprecated

Author message:

This project has been renamed to Symbolist. Install using symbolist instead.

ios-symbols
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

ios-symbols

🔣 ️A collection of every symbol from SF Symbols.

build npm gzipped license

🔗 Explore and preview symbols in the playground.

Introduction

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

Installation

Skypack

<script type="module">
  import { symbols } from "https://cdn.skypack.dev/ios-symbols"
</script>

Yarn

yarn add ios-symbols

npm

npm install ios-symbols

Usage

symbols

Import symbols.

import { symbols } from "ios-symbols"

// symbols: {"0.circle": "􀀸", "0.circle.fill": "􀀹", ...}

getSymbol

Import getSymbol.

import { getSymbol } from "ios-symbols"

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 "ios-symbols"

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

const name = getSymbolName("􀣳")

// name: "lasso.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.

Related

📏 ios-dimensions: A collection of dimensions from iOS.

Readme

Keywords

Package Sidebar

Install

npm i ios-symbols

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

646 kB

Total Files

21

Last publish

Collaborators

  • marcbouchenoire