Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 07158574-5…

icons

Phosphor icon constants. The phosphor font is registered as a named family `phosphor` in the engine, so render icons by setting `style.fontFamily = "phosphor"` on the label that contains them.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2mo ago
What it does

icons

Phosphor icon constants. The phosphor font is registered as a named family phosphor in the engine, so render icons by setting style.fontFamily = "phosphor" on the label that contains them.

The font is ALSO appended to the proportional family as a fallback, but the fallback path is unreliable for PUA codepoints in egui 0.34 (see issue #2191) — always pass fontFamily = "phosphor" for icons.

Curated set covering DAW transport, media controls, file management, desktop shell, editor chrome, and common state indicators. For icons not listed here, see https://phosphoricons.com — pass the codepoint as a UTF-8 string literal directly.

Exports

  • Icon.styled(extra: LabelOpts?) -> LabelOpts — build a UI.label opts table with style.fontFamily = "phosphor" applied. Merges with the supplied extra.
  • Icon.<Name>: string — UTF-8 codepoint constants. Categories:
    • Transport / media: Play, Pause, Stop, Record, FastForward, Rewind, SkipForward, SkipBack, Repeat, Shuffle.
    • Audio / DAW: Microphone, Headphones, Equalizer, Sliders, Metronome, MusicNote, Waveform, SpeakerHigh, SpeakerLow, SpeakerNone, SpeakerSimpleHigh, SpeakerMuted.
    • File / folder: Folder, FolderOpen, File, FileText, FileAudio, FileVideo, FileImage, FileCode, FloppyDisk, Trash, UploadSimple, DownloadSimple.
    • Desktop / shell: Desktop, DesktopTower, Monitor, Keyboard, Mouse, House, Sidebar, Cpu.
    • Editor: Pencil, Plus, Minus, Check, MagnifyingGlass(Plus|Minus)?, Gear, Power, Eye, EyeSlash, Lock, LockOpen, Bell, Palette, Funnel, Clipboard.
    • Code / dev: Code, Terminal, Bug, GitBranch, GitCommit, GitMerge, Database, Cloud.
    • Arrows / nav: ArrowUp/Down/Left/Right, ArrowsClockwise, ArrowsIn, ArrowsOut, CaretUp/Down/Left/Right.
    • Layout / list: List, GridFour, DotsThree, DotsThreeVertical.
    • State / status: Info, Warning, WarningCircle, CheckCircle, XCircle, Question, Heart, Star, Tag, Hash, At.
    • Shapes: Circle, Square, Triangle.
    • Productivity / shell apps: Calculator, Notepad, NotePencil, Note.
    • Games / cards: GameController, Bomb, Cards, Diamond, Spade, Club.

Types:

  • LabelStyle = { fontFamily?: string, fontSize?: number, color?: string, [string]: any }
  • LabelOpts = { style?: LabelStyle, [string]: any }

Usage

local Icon = require("@builtin::modules.icons")

UI.label(Icon.Play, { style = { fontFamily = "phosphor", fontSize = 24 } })
UI.label(Icon.Folder .. "  Documents", {
    style = { fontFamily = "phosphor", fontSize = 14 },
})

-- Or use the helper to enforce the phosphor family:
UI.label(Icon.Play, Icon.styled({ style = { fontSize = 24, color = "#fff" } }))

Notes

  • The constants are plain string values — each is a single UTF-8 Private Use Area codepoint. Concatenate freely with surrounding text.
  • Icon.styled mutates the supplied opts table (extra.style is forced). Pass a fresh table per call site if you need to reuse opts.
  • Curated subset only — for icons outside this set, paste the codepoint from https://phosphoricons.com directly.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

strict

styled(extra: LabelOpts?) → LabelOpts

Build an opts table for `UI.label` with the phosphor font family applied. Existing keys on `extra` merge through; `extra.style.fontFamily` is forced to `"phosphor"`.

argtypedescription
extraLabelOpts?Optional base opts. Style keys merge under `style`; other keys pass through.

examples

UI.label(Icon.Play, Icon.styled({ style = { fontSize = 24 } }))
⌬ Types
LabelStyle = {LabelOpts = {

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

3items
·
other · born here
▤file
▲ 0↑ born
backing path · modules/icons.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.