0.1.0 • Published 9 months ago

@zunicornshift/mui-iconify-picker v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@zunicornshift/mui-iconify-picker

180,000+ icons in one icon picker by the support of Iconify.

This React component is allowing users to search Iconify icons and select. And this component is using Material UI components internally.

Installation

The react, react-dom and @mui/material are peer dependencies of this package. It means you have to install them all in your project before installing this module.

"@mui/material": "^5.0.0 || ^6.0.0"
"react": "^17.0.0 || ^18.0.0"
"react-dom": "^17.0.0 || ^18.0.0"

Then run the below commands based on your package manager.

npm install --save @zunicornshift/mui-iconify-picker #NPM
yarn add @zunicornshift/mui-iconify-picker           #Yarn

Usage

import IconifyPicker from "@zunicornshift/mui-iconify-picker";


<IconifyPicker />

All the props are optional, you can install it and use it without any customizations.

Customizations

Prop NameTypeDescription
valuestring \| nullThe name of the selected icon. Icon names must be in "mdi:airplane" format.
onChange(value: string, e: MouseEvent<HTMLElement>) => voidA callback function that receiving value as the first parameter and the original event as the second parameter.
placeholderTextstringThe placeholder text that displaying in search box
variant"standard"\|"filled"\|"outlined"The variant of the outer input field
apiBaseUrlstring \| URLThe base URL of the Iconify API. You can use a backup host or a self hosted URL. The default value is https://api.iconify.design. Please support iconfiy.
initIconsstring[]Icon list to display when opening the icon selector popup.
prefixesstringFilter the icon results. Comma separated list of icon set prefixes. You can use partial prefixes that end with "-", such as "mdi-" matches "mdi-light".
prefixstringFilter the icon results. Icon set prefix if you want to get result only for one icon set.
categorystringFilter the icon results. Limit search to icon sets from specific category.
limitnumberThe number of icons receiving in one API call.
inputPropsOutlinedInputProps \| FilledInputProps \| InputPropsControl the outer wrapper.
popoverPropsPopoverPropsControl the popover component.
slots.loadingReact.ComponentTypeA react component to display when items loading
slots.errorReact.ComponentTypeA react component to display when an error occurred when searching

All the props are optional.

0.1.0

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.2

9 months ago