Foundations

Icon

@xui/icon

Sizing and colour for an @ng-icons icon — a directive on <ng-icon>, so the bare xui attribute is what applies the size scale and the semantic colours. An icon is decorative and hidden from assistive technology by default; give it a label when it carries meaning on its own.

Install

pnpm add @xui/icon

Add the barrel to a standalone component's imports:

import { XuiIconImports } from '@xui/icon';

@Component({
  imports: [XuiIconImports],
  // …
})

Examples

Default

Loading preview…

Sizes

Loading preview…

Colors

Loading preview…

Matrix

Loading preview…

Accessible name

Loading preview…

API

XuiIcon

directiveng-icon[xui]

Sizing and colour for an @ng-icons icon.

Inputs

NameTypeDefaultclassClassValueThe user-defined classes. Note that a colour utility will not land here — @ng-icons outranks the utilities layer, so reach for color instead. Everything else (layout, spacing, transitions) applies as usual.''sizeXuiIconSizeIcon box size, from the shared scale. none leaves the size to the surrounding text or to your own classes; any other string is passed through as a length.this.config.sizecolorXuiIconColorSemantic colour. Defaults to inheriting the surrounding text colour, so an icon in a button matches its label.this.config.colorlabelstring | nullAn accessible name. Setting it marks the icon as meaningful content rather than decoration.null

Source

libs/ui/icon/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.