Vizel API / react/src / VizelIconProvider
Function: VizelIconProvider()
ts
function VizelIconProvider(__namedParameters): Element;Defined in: packages/react/src/components/VizelIconProvider.tsx:53
Provider component for customizing icons throughout the application. Wrap your application or editor with this provider to use custom icon sets.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | VizelIconProviderProps |
Returns
Element
Example
tsx
import { VizelIconProvider } from "@vizel/react";
// Use Phosphor icons
const phosphorIcons = {
heading1: "ph:text-h-one",
heading2: "ph:text-h-two",
bold: "ph:text-b-bold",
italic: "ph:text-italic",
// ... more icons
};
function App() {
return (
<VizelIconProvider icons={phosphorIcons}>
<VizelEditor />
</VizelIconProvider>
);
}