$ rezi
Widgets

Icon

Renders a single glyph from the icon registry.

Renders a single glyph from the icon registry.

Usage

import { ui, rgb } from "@rezi-ui/core";

ui.icon("status.check");
ui.icon("arrow.right", { style: { fg: rgb(0, 255, 0) } });
ui.icon("ui.search", { fallback: true });

Props

PropTypeDefaultDescription
iconstringrequiredIcon path (e.g. "status.check")
styleTextStyle-Optional style override
fallbackbooleanfalseUse ASCII fallback glyph
keystring-Reconciliation key

Examples

1) Inline status

import { ui } from "@rezi-ui/core";

ui.row({ gap: 1 }, [ui.icon("status.warning", { fallback: true }), ui.text("Needs attention")]);

2) File icon

import { ui } from "@rezi-ui/core";

ui.row({ gap: 1 }, [ui.icon("file.folder", { fallback: true }), ui.text("src/")]);

Notes

  • Icons render as text. Use fallback: true for portable rendering.
  • See Icons for the full registry.
  • Icons - Registry table and categories
  • Badge - Semantic labels

On this page