Skip to Content
FrontendComponentsDeprecated 2023IconsIconDropdown Component

IconDropdown Component

Description de l'image

Overview

The IconDropdown component provides access to multiple icon libraries, allowing you to dynamically enable or disable specific sets of icons within your project.

Installation

npm install @phpcreation/frontend-icons-react-nextjs-bundle

Setup

To ensure proper functionality, you need to define the base URL for the icon assets in your environment variables.

Add the Base URL to your .env File

NEXT_PUBLIC_ICONS_URL=https://icons.phpr.link/

Usage

Importing the Component

In the component where you need the IconDropdown, import it as follows:

  • Import the IconDropdown
import { IconDropdown } from "@phpcreation/frontend-icons-react-nextjs-bundle/components";

Basic Example

<IconDropdown accesses={{ fontAwesome: true, glyphiconsV1: false, glyphiconsV2: true, phpcApp: false }} />

For each available library, you can specify which one you want to use in the project

Image

Available Icon Libraries

You can enable or disable the following icon libraries:

Library NameDescription
fontAwesomeEnables FontAwesome icons
glyphiconsV1Enables Glyphicons Version 1
glyphiconsV2Enables Glyphicons Version 2
phpcAppEnables PHP Creation App icons
Last updated on