Vizel API / vue/src / provideVizelIcons
Function: provideVizelIcons()
ts
function provideVizelIcons(customIcons?): void;Defined in: packages/vue/src/components/VizelIconContext.ts:33
Provide custom icon mappings to child components. Call this in a parent component's setup to customize icons for all descendants.
Accepts a plain value, a Ref, or a getter so the provided icons stay reactive when the source changes (for example when bound to a component prop).
Parameters
| Parameter | Type |
|---|---|
customIcons? | MaybeRefOrGetter< | Partial<Record<VizelIconName, string>> | undefined> |
Returns
void
Example
vue
<script setup lang="ts">
import { provideVizelIcons } from "@vizel/vue";
// Use Phosphor icons
provideVizelIcons({
heading1: "ph:text-h-one",
heading2: "ph:text-h-two",
bold: "ph:text-b-bold",
italic: "ph:text-italic",
});
</script>