This package exposes a map of symbol name to character code for SF Symbols.
Note that this is the raw names and character data, not the visual representation of the symbols. You will still need a copy of the SF Symbols font, which is subject to the usage terms of SF Symbols.
import symbols from '@rmccue/sfsymbols';
// Use characters as needed.
`Here is a ${ symbols['pencil'] }`.
To update the data, perform the following steps:
- Open the SF Symbols app
- Select all icons: ⌘A
- Copy data ⌘C and save into
data/unicode.dat
- Copy names ⌘⇧C and save into
data/names.dat
- Run
yarn build