Skip to content

Icon

Used to display a SVG icon.

import { Icon } from '@fintech-sandpit/ui/react';
import { faHome } from '@fortawesome/free-solid-svg-icons';
return (
<Icon
as={faHome}
size="sm"
colorScheme="primary"
/>
);
NameTypeRequiredDefaultDescription
asIconDefinitionYesIcon definition 1
colorSchemeColorSchemeIcon color scheme 2
sizeSizemdIcon size
boxSizeCssUnitIcon box size 3
  1. See Icons for the list of available icon definitions.
  2. By default, the icon will inherit the color of its parent element.
  3. If provided, the size prop will be ignored.
type ColorScheme = 'neutral' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning'
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
type CssUnit = `${number}${'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%'}`