Skip to content

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

ParameterType
__namedParametersVizelIconProviderProps

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>
  );
}

Released under the MIT License.