Skip to Content
DesignIcons

Icons

The Mukoko design system uses Lucide React as its icon library. Lucide provides a consistent set of open-source icons with a clean, minimal style that complements the Five African Minerals design language.

Installation

Lucide React is included as a dependency when you install Mukoko components. To add it manually:

pnpm add lucide-react

Usage

Import icons individually for optimal tree-shaking:

import { Sun, Moon, Menu, X, ArrowRight, Search } from "lucide-react" <Sun className="size-4" /> <ArrowRight className="size-5 text-muted-foreground" />

Always import specific icons — never import the entire library.

Sizing conventions

ContextSize classPixelsUsage
Inline textsize-312pxInside badges, small labels
Button iconsize-416pxIcon buttons, button with text
Card iconsize-520pxCard headers, list items
Feature iconsize-624pxFeature cards, section icons
Hero iconsize-832pxLarge display icons
Illustrationsize-1248pxEmpty states, large callouts

Use the size-* shorthand (which sets both width and height) instead of separate h-* and w-* classes.

Common icons in Mukoko apps

IconComponentUsage
MenuhamburgerMobile menu toggle
XcloseClose dialogs, dismiss
ArrowLeftbackBack navigation
ArrowRightforwardNext, link arrow
ChevronDownexpandDropdown trigger
ExternalLinkexternalExternal links

Actions

IconComponentUsage
SearchsearchSearch input
PlusaddCreate new item
Trash2deleteDelete action
PencileditEdit action
CopycopyCopy to clipboard
Share2shareShare content
DownloaddownloadDownload file

Status

IconComponentUsage
ChecksuccessCompletion, validation pass
AlertCirclewarningWarning message
AlertTriangleerrorError state
InfoinfoInformational message
Loader2loadingLoading spinner (animate with animate-spin)

Ecosystem

IconComponentUsage
Sun / MoonthemeTheme toggle
GithubsocialGitHub link
BellnotificationNotification bell
SettingssettingsSettings/preferences
UseraccountUser menu

Accessibility

Icon-only buttons

When an icon is used without visible text, always provide an accessible label:

{/* Using aria-label */} <Button variant="ghost" size="icon" aria-label="Close dialog"> <X className="size-4" /> </Button> {/* Using sr-only text */} <Button variant="ghost" size="icon"> <Search className="size-4" /> <span className="sr-only">Search</span> </Button>

Decorative icons

Icons that accompany visible text are decorative and should be hidden from screen readers:

<Button> <Plus className="size-4" aria-hidden="true" /> Add item </Button>

Lucide icons have aria-hidden="true" set by default, so this is handled automatically in most cases.

Icon color

Icons inherit color from their parent via currentColor. Use text color utilities:

<Search className="size-4 text-muted-foreground" /> <Check className="size-4 text-[var(--color-malachite)]" />

Icon with text alignment

When pairing icons with text, use flex with items-center and appropriate gap:

<span className="flex items-center gap-1.5 text-sm text-muted-foreground"> <Clock className="size-3.5" /> 3 minutes ago </span>

For buttons and links, the gap-* within the flex container keeps spacing consistent:

<Button className="gap-2"> <Download className="size-4" /> Download report </Button>
Last updated on