This project is a React component for selecting icons. The Icon Picker component displays a grid of icons, allowing users to paginate through them and select one. The selected icon is then displayed in a designated area.
- Displays a grid of icons.
- Paginated view for navigating through a large set of icons.
- Customizable properties such as the number of rows, columns, icon dimensions, and picker dimensions.
- Clickable icons that update the main display with the selected icon.
- Modal popup for the icon picker that can be closed.
-
Clone the repository:
git clone https://github.com/Aditya8840/IconPicker.git
-
Navigate to the project directory:
cd icon-picker-component -
Install the dependencies:
npm install
-
Start the application:
npm start
-
Open your browser and navigate to
http://localhost:3000. -
Click on the main icon display area to open the icon picker modal.
-
Select an icon from the modal. The selected icon will be displayed in the main area.
The Iconmodel component accepts several props for customization:
rowsInOnePage(Number): The number of rows in one page of the icon grid.columnsInOnePage(Number): The number of columns in one page of the icon grid.iconHeight(Number): The height of each icon.iconWidth(Number): The width of each icon.pickerHeight(String): The height of the icon picker modal. Default is500px.pickerWidth(String): The width of the icon picker modal. Default is500px.onIconSelect(Function): The callback function when an icon is selected.onClose(Function): The callback function to close the icon picker modal.