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.imageMethods
applyFont
Apply a font configuration
Configures the symbol with the specified font size and weight.
typescript
applyFont(font): voidfont- Font object with size and optionally weight
Example:
javascript
symbol.applyFont(Font.systemFont(20))applyUltraLightWeight
Apply ultra light weight
typescript
applyUltraLightWeight(): voidExample:
javascript
symbol.applyUltraLightWeight()applyThinWeight
Apply thin weight
typescript
applyThinWeight(): voidExample:
javascript
symbol.applyThinWeight()applyLightWeight
Apply light weight
typescript
applyLightWeight(): voidExample:
javascript
symbol.applyLightWeight()applyRegularWeight
Apply regular weight
typescript
applyRegularWeight(): voidExample:
javascript
symbol.applyRegularWeight()applyMediumWeight
Apply medium weight
typescript
applyMediumWeight(): voidExample:
javascript
symbol.applyMediumWeight()applySemiboldWeight
Apply semibold weight
typescript
applySemiboldWeight(): voidExample:
javascript
symbol.applySemiboldWeight()applyBoldWeight
Apply bold weight
typescript
applyBoldWeight(): voidExample:
javascript
symbol.applyBoldWeight()applyHeavyWeight
Apply heavy weight
typescript
applyHeavyWeight(): voidExample:
javascript
symbol.applyHeavyWeight()applyBlackWeight
Apply black weight
typescript
applyBlackWeight(): voidExample:
javascript
symbol.applyBlackWeight()