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}
colorScheme="primary"
size="sm"
/>
);
NameTypeRequiredDefaultDescription
asIconDefinitionYesIcon definition 1
colorSchemeColorSchemeIcon color scheme 2
sizeSizeIcon 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. By default, the icon will inherit font size from its parent element (i.e. 1em).
  4. If provided, the size prop will be ignored.
type ColorScheme = 'neutral' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning'
type CssUnit = `${number}${'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%'}`
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'