Dynamic icon rendering
Choose an icon at runtime without bundling the whole set.
Use a static map
Map the values you need to components. The bundler sees each import, so tree-shaking keeps working.
import { IconCircleCheck, IconCircleX, IconClock } from "@axcore/xicons-react";const STATUS = { done: IconCircleCheck, failed: IconCircleX, pending: IconClock };export function StatusIcon({ status }: { status: keyof typeof STATUS }) { const Icon = STATUS[status]; return <Icon size={16} />;}Avoid namespace imports
Brand logos by name
For the seven full-colour brand logos, <Icon name={…} /> is built for runtime names. See brand icons.
Something wrong or missing?Open an issue