ZUI

Search documentation

Find a page or a heading.

Icons

Brand marks through one BrandMark component, and file-type icons as React components.

@zeroxsolutions/icons is an npm package, not a registry item. The AI Provider Picker component depends on it, and an app can import from it directly.

tsx

Installation

bash

react and react-dom are peer dependencies, on React 19.

Usage

Brand marks come from one component; file-type icons have one import path each.

tsx
tsx

Categories

brand-mark

<BrandMark name="..."> draws any of about 200 brands: AI labs and inference hosts, developer and cloud tools, social networks and workspace apps.

  • name is a union generated from the manifest, so a mistyped name does not compile.
  • variant is 'color', 'mono', 'avatar' or 'combine', and defaults to 'color'.
  • size is a number of pixels or a CSS length, '1em' by default; the mark keeps its aspect ratio.
  • label gives the mark an accessible name. Without it the mark is decorative, since in a button or a link the text beside it is the name.
  • shape is 'circle' or 'square' and rounds an avatar.
  • base serves one call from another origin.

How each variant draws:

BrandMarkStyleProvider makes the variant ambient for every BrandMark below it, and a call's own variant wins. useBrandMarkStyle() reads and sets it. A BrandMark outside any provider reads the module default; outside React, setBrandMarkStyle(variant) sets that default and brandMarkUrl(name, { variant, base }) returns a file's URL.

A variant a brand lacks is resolved before any request: combine and avatar fall to color, and color falls to mono. A file that fails to load falls the same way, and when mono fails the mark renders the first letter of its name in a round <span>, so nothing is blank.

Every file is read from https://icons.zeroxsolutions.com/brands. To serve them yourself, copy dist/assets/brands from the package to your own origin and point the module at it:

tsx

Call setBrandMarkBase in a module both the server and the client evaluate, or pass base: a base set on one side alone gives a server-rendered src the client's does not match. A base on another origin must answer with Access-Control-Allow-Origin, since mono and combine are fetched in CORS mode.

material

The Material Icon Theme's file-type icons, in full colour. The export is the name in PascalCase plus Icon, so material/typescript exports TypescriptIcon. An icon with artwork for a light background also exports it as .Light.