Icons

Semantic icon names available in the design system. These adapt to the active theme's icon registry.

Available Names

Components that accept an icon prop use IconType: either a semantic name string or a direct SVG component. The semantic names below are resolved through the global icon registry.
NameUsage
closeDismiss, close dialogs/panels
chevronDownDropdown triggers, expand/collapse
chevronLeftNavigate back, previous
chevronRightNavigate forward, next
checkCheckbox checked, confirm
successSuccess status indicator
errorError status indicator
warningWarning status indicator
infoInfo status indicator, tooltips
calendarDate pickers, scheduling
clockTime pickers, timestamps
externalLinkLinks opening in new tab
menuHamburger menu, navigation toggle
moreHorizontalOverflow menu, additional actions
searchSearch inputs, find
arrowUpSort ascending, move up
arrowDownSort descending, move down
arrowsUpDownSortable column indicator
funnelFilter controls
eyeSlashHidden/visibility toggle
viewColumnsColumn visibility settings
copyCopy to clipboard
checkDoubleCopied confirmation
wrenchSettings, configuration
stopStop/cancel action
microphoneVoice input, audio recording

Custom Icons

For icons not in the semantic list, pass an SVG component directly. Any ComponentType<SVGProps<SVGSVGElement>> works; Icon applies size and color styling automatically.
Using custom SVG components
tsx
import { PhotoIcon } from '@heroicons/react/24/outline';
import { HeartIcon } from 'lucide-react';
<Icon icon={PhotoIcon} size="lg" />
<Icon icon={HeartIcon} color="negative" />

Theme Overrides

Themes can replace the default SVGs for any semantic name using registerIcons(). This lets you swap the entire icon set (e.g. heroicons → lucide) without touching component code.
Registering theme icons
tsx
import { registerIcons } from '@astryxdesign/core/Icon';
import { XMarkIcon, ChevronDownIcon } from '@heroicons/react/24/outline';
registerIcons({
close: <XMarkIcon />,
chevronDown: <ChevronDownIcon />,
// ... override as many as needed
});

Adding New Icons

To add a new semantic icon name to the design system:
  1. Add the name to IconName type in packages/core/src/Icon/globalIconRegistry.tsx
  2. Add the default SVG to packages/core/src/Icon/defaultIcons.tsx
  3. Add a row to the Available Names table in packages/cli/docs/icons.doc.mjs