Skip to content

SFSymbol

SF Symbols system icons

SFSymbol provides access to Apple's SF Symbols icon library.

Use SFSymbol to:

Note

Requires iOS 13+

Examples

javascript
let symbol = SFSymbol.named("star.fill");
let image = symbol.image;
javascript
let symbol = SFSymbol.named("heart");
symbol.applyBoldWeight();
let image = symbol.image;
javascript
let symbol = SFSymbol.named("gear");
symbol.applyFont(Font.systemFont(24));

Properties

image

  • Type: JSValue

Get the symbol as an image

Returns the symbol rendered as an Image object.

javascript
let image = symbol.image

Methods

applyFont

Apply a font configuration

Configures the symbol with the specified font size and weight.

typescript
applyFont(font): void
  • font - Font object with size and optionally weight

Example:

javascript
symbol.applyFont(Font.systemFont(20))

applyUltraLightWeight

Apply ultra light weight

typescript
applyUltraLightWeight(): void

Example:

javascript
symbol.applyUltraLightWeight()

applyThinWeight

Apply thin weight

typescript
applyThinWeight(): void

Example:

javascript
symbol.applyThinWeight()

applyLightWeight

Apply light weight

typescript
applyLightWeight(): void

Example:

javascript
symbol.applyLightWeight()

applyRegularWeight

Apply regular weight

typescript
applyRegularWeight(): void

Example:

javascript
symbol.applyRegularWeight()

applyMediumWeight

Apply medium weight

typescript
applyMediumWeight(): void

Example:

javascript
symbol.applyMediumWeight()

applySemiboldWeight

Apply semibold weight

typescript
applySemiboldWeight(): void

Example:

javascript
symbol.applySemiboldWeight()

applyBoldWeight

Apply bold weight

typescript
applyBoldWeight(): void

Example:

javascript
symbol.applyBoldWeight()

applyHeavyWeight

Apply heavy weight

typescript
applyHeavyWeight(): void

Example:

javascript
symbol.applyHeavyWeight()

applyBlackWeight

Apply black weight

typescript
applyBlackWeight(): void

Example:

javascript
symbol.applyBlackWeight()