Icon Selector

Beta

Icon Selector is a field type that allows users to choose an icon from a predefined list

installyarn add @clayui/core
versionNPM Version
useimport {IconSelector} from '@clayui/core';

Introduction

Icon Selector is a field type that allows users to choose an icon from a predefined list. When clicking the button, a dropdown menu appears displaying available icons, enabling selection with a single click. The chosen icon is then visually represented within the field.

Example

import {IconSelector} from '@clayui/core';
import React from 'react';

import '@clayui/css/lib/css/atlas.css';

const spritemap = '/icons.svg';

export default function App() {
	return (
		<div className="p-4">
			<IconSelector spritemap={spritemap} />
		</div>
	);
}

API Reference