UIViews
Symbol
Display an SF Symbol or Pika icon.
Symbol uses SF Symbols by default:
import { Modifier, ShapeStyle, Symbol } from "onescript/views"
<Symbol
name="house.fill"
modifier={Modifier.foregroundStyle(ShapeStyle.primary)}
/>Set source="pika" for a Pikaicons name:
<Symbol
source="pika"
name="home.smile.fill"
/>In the app, go to Settings โ Symbols, then open SF Symbols or Pikaicons to browse icons by category or search by name. You can also use the Web Pikaicons catalog. Select an icon in either catalog to copy its full name for the name prop.
| Prop | Type | Description |
|---|---|---|
name | string | Symbol name. |
source | "sf" | "pika" | Symbol provider. Defaults to "sf". |
resizable | boolean | Allows the symbol to resize. |
SF Symbol names are validated against the symbols available on the current system. Pika names use their exact dot-separated form, including the .fill or .stroke suffix, and are validated against the bundled Pikaicons catalog.
How is this guide?
Last updated on