Skip to content

pantoken / packages/core/src / collectIcons

Funktion: collectIcons()

collectIcons(options?): IconLayer

Beta

Sammle die vereinheitlichte InstUI-Icon-Ebene. Benutzerdefinierte Glyphen haben Vorrang vor gleichnamigen Lucide\nglyphen. Die Ausgabe ist nach Namen sortiert, um deterministische Ergebnisse zu erzielen.

Parameter

options?

CollectIconsOptions = {}

Rückgabe

IconLayer

Beispiele

Alle Glyphen sowie die speziellen Icon-Farbwerte sammeln

ts
import { collectIcons } from "@pantoken/core";

const { glyphs, colors } = collectIcons();
// glyphs → IconToken[] (Custom + Lucide, name-sorted)
// colors → [["--instui-icon-color-ai", "…"], ["--instui-icon-color-inherit", "currentColor"]]

Nur auf von Instructure erstellte Glyphen beschränken

ts
import { collectIcons } from "@pantoken/core";

const { glyphs } = collectIcons({ includeLucide: false });
// → only the Custom (Instructure-authored) glyphs