This package contains custom icons designed specifically for NexusUI applications. These icons work in exactly the same way as the icons from MUI.
Add the library as a dependency to your project:
# With yarn
yarn add @nexusui/icons
# With npm
npm install --save @nexusui/icons
In your typescript file, import the component(s) you want to use:
// Replace IconName with the specific icon you want to use
import { IconName } from '@nexusui/icons';
// or
import IconName from '@nexusui/icons/IconName';
<IconName fontSize={'large'} color={'primary'}/>
The 3.0.0 release had changes names of some icons. The following icons have been renamed:
-
TransparentAppearance
toTransparent
-
FilledAppearance
toCubeFilled
if you were using these icons, you will need to update your imports. and change the name of the icon in your code.
// named imports
- import { TransparentAppearance } from '@nexusui/icons';
+ import { Transparent } from '@nexusui/icons';
// default imports
- import TransparentAppearance from '@nexusui/icons/TransparentAppearance';
+ import Transparent from '@nexusui/icons/Transparent';
// named imports
- import { FilledAppearance } from '@nexusui/icons';
+ import { CubeFilled } from '@nexusui/icons';
// default imports
- import FilledAppearance from '@nexusui/icons/FilledAppearance';
+ import CubeFilled from '@nexusui/icons/CubeFilled';
This package previously contained a subfolder of product logos. These logos have been migrated to a separate package (@nexusui/branding). You will need to install the new package and update your imports accordingly.
yarn add @nexusui/branding
or
npm install @nexusui/branding
// named imports
- import { LogoName } from '@nexusui/icons/products';
+ import { LogoName } from '@nexusui/branding';
// default imports
- import LogoName from '@nexusui/icons/products/LogoName';
+ import LogoName from '@nexusui/branding/LogoName';