Clidey UXDocs

Icon

Use catalog components for the icon itself. Use Icon when you need a consistent presentation surface around an SVG.

TSX

import { Icon, IconSettings, IconDownload, Button } from '@clidey/ux';

<Icon icon={<IconSettings />} size={20} variant="subtle" />
<Icon icon={<IconSettings />} size={24} variant="solid" />
<Button variant="outline"><IconDownload /> Export</Button>

Interactive example#

Icon · Live example

Compare presentation variants while keeping the same catalog artwork.

The code uses shared demo presentation helpers. Their complete source and styling are included in the LLM build context.

Props#

PropTypeDefaultPurpose
iconSVG React elementRequiredElement cloned with the chosen dimensions.
sizenumber24Width and height of the child SVG.
variant"plain", "subtle", "solid""plain"Plain icon, muted surface, or filled icon tile.
classNamestring—Additional classes on the wrapper span.

Icon forwards its ref to the wrapping span and accepts span HTML attributes. Its child SVG is decorative. Put an accessible name on an icon-only button, or provide text beside a standalone status icon.

Choosing an API#

SituationAPI
Fixed React iconIconSearch, IconHome, and other named catalog exports
Dynamic React iconCatalogIcon with a validated catalog name
Background tile or consistent wrapperIcon with a catalog element
Non-React markup or static assets@clidey/ux/icons URL map or individual SVG files

Read The icon catalog for naming, alternative artwork, and asset handling.

Was this page helpful?