Replace SnowUI functional icons for an application or subtree while retaining defaults for unconfigured icons.

How to use

Use IconProvider to share icon configuration with its descendants. It does not display an icon itself; Icon or a resource component renders the actual graphic.

  • icons maps stable semantic names to icon components. resolver looks up an icon by name.

  • The provider affects only descendant icon lookup and renders children in place. It adds no visible graphic or layout wrapper.

Import

import { IconProvider } from '@snowui-design-system/components';

Usage

Icon mapping

Nested providers

Custom resolver

API Reference

Property Type Default Example Description
icons ComponentIconMap {} icons={ExampleIcon} Map stable semantic names to external Svelte icon components.
resolver ComponentIconResolver — resolver={ExampleIcon} Resolve an icon by { name, weight }. Takes precedence over icons on the same provider.
children Snippet — <IconProvider>Content</IconProvider> Descendant subtree rendered in place without an added layout wrapper.
No data