ZUI

Search documentation

Find a page or a heading.

Icon

A lucide icon sized and coloured by its classes, matching the label of the container around it.

Installation

bash

The CLI writes components/ui/icon.tsx in the engine's own version, installs Text and Utils, and adds lucide-react-native and react-native-svg. It also adds the engine as nativewind@^4.2.7 or uniwind@^1.13.0, which replaces a narrower range the app already holds.

Usage

tsx
tsx

A size- class sets its size and a text- class its colour. Inside a Button it takes the label's colour and the button size's icon size.

API reference

Icon

Takes every prop a lucide icon takes, such as size, color and strokeWidth, plus:

as is the lucide icon to draw. Its colour starts at text-foreground; the classes of the container around it go over that, and className over both. An explicit size or color wins over a class, and a size prop or a size- class drops the container's size.

IconClassContext

The classes a container gives every Icon inside it that names no size of its own. Button provides it with the icon size of each of its sizes.