GitHubGitHub
← All components
Visual / component

Icon

The typed inline SVG vocabulary shared by every component and widget in the library.

DecorativeLabelledSized
gaugeactivityservertabletreebell

A labelled icon is announced as “Server”; the swatches above are decorative.

<Icon name="server" label="Server" />

Installation

pnpm add @chanrg/4ui

Import the stylesheet once, at the root of your app:

import '@chanrg/4ui/styles.css';

Usage

import { Icon } from '@chanrg/4ui';<Icon name="server" label="Server" />

API reference

Props

PropTypeDefaultDescription
nameIconNamerequiredTyped icon identifier.
labelstringMakes the icon meaningful to assistive technology.

CSS variables

VariableDescription
--4ui-surfacePrimary component surface.
--4ui-textPrimary foreground color.
--4ui-borderDefault control and panel border.

Accessibility

  • Decorative icons are hidden; labelled icons expose image semantics.

Dependencies

No runtime component dependencies.