Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcbouchenoire/symbolist
π£ A collection of every symbol from SF Symbols.
https://github.com/marcbouchenoire/symbolist
font icons san-francisco symbols
Last synced: 3 months ago
JSON representation
π£ A collection of every symbol from SF Symbols.
- Host: GitHub
- URL: https://github.com/marcbouchenoire/symbolist
- Owner: marcbouchenoire
- License: mit
- Created: 2021-07-11T13:02:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T21:58:51.000Z (7 months ago)
- Last Synced: 2024-10-17T01:30:04.632Z (4 months ago)
- Topics: font, icons, san-francisco, symbols
- Language: TypeScript
- Homepage: https://marcbouchenoire.com/projects/symbolist
- Size: 2.83 MB
- Stars: 23
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
π£ A collection of every symbol from SF Symbols.
[![build](https://img.shields.io/github/actions/workflow/status/marcbouchenoire/symbolist/.github/workflows/ci.yml?color=%23e27)](https://github.com/marcbouchenoire/symbolist/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/symbolist?color=%23e27)](https://www.npmjs.com/package/symbolist)
[![size](https://img.shields.io/bundlephobia/minzip/symbolist?label=size&color=%23e27)](https://bundlephobia.com/package/symbolist)
[![coverage](https://img.shields.io/codecov/c/github/marcbouchenoire/symbolist?color=%23e27)](https://codecov.io/gh/marcbouchenoire/symbolist)
[![license](https://img.shields.io/github/license/marcbouchenoire/symbolist?color=%23e27)](https://github.com/marcbouchenoire/symbolist/blob/main/LICENSE)- π€ [**Automated**](#automation): Authored and updated automatically
- π§ͺ **Reliable**: Fully tested with [100% code coverage](https://codecov.io/gh/marcbouchenoire/symbolist)
- π¦ **Typed**: Written in [TypeScript](https://www.typescriptlang.org/) and includes definitions out-of-the-box
- π¨ **Zero dependencies**## Introduction
[SF Symbols](https://developer.apple.com/sf-symbols/) is a library of iconography from Apple, integrated into the San Francisco system fonts.
## Installation
```bash
npm install symbolist
```## Usage
#### `symbols`
Import `symbols`.
```typescript
import { symbols } from "symbolist"// symbols: {"0.circle": "τΈ", "0.circle.fill": "τΉ", ...}
```#### `getSymbol`
Import `getSymbol`.
```typescript
import { getSymbol } from "symbolist"
```Given a symbol name, `getSymbol` will return its symbol (or `undefined` for unknown symbols).
```typescript
const symbol = getSymbol("scribble.variable")// symbol: "τ€"
```#### `getSymbolName`
Import `getSymbolName`.
```typescript
import { getSymbolName } from "symbolist"
```Given a symbol, `getSymbolName` will return its name (or `undefined` for unknown symbols).
```typescript
const name = getSymbolName("τ£³")// name: "lasso.and.sparkles"
```## Automation
Symbols are extracted with the `generate` commandβusing the [SF Symbols](https://developer.apple.com/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.