Icon

Icon const

Icon: ComponentType<SVGIconProps> = ...

Icon component is designed for svg icons display, but also supports icon display of other formats meanwhile. SVG icons are shown as inline SVG elements in the component, while icons in other formats can be loaded using data url.

Example:

   
1
2
3
import { Icon } from 'jimu-ui';
const addIcon = require('jimu-ui/lib/icons/add.svg');
<Icon icon={addIcon} size="36" color="red" />

Props:

See SVGIconProps for more details.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.