` with `display: contents`. Every icon inside reads these variables through normal CSS inheritance.
```jsx
import { SolarProvider } from '@solar-icons/react'
import { HeartIcon } from '@solar-icons/react/bold'
;
```
The provider sets `--solar-color: #3b82f6` on the wrapper. The icon reads `var(--solar-color, currentColor)` for its fill and stroke.
## Priority rules [#priority-rules]
When multiple sources set the same property, the winner follows the rules below.
1. **Explicit prop on the icon** (highest priority). Sets inline style on the SVG.
2. **SolarProvider** (CSS variables). The icon reads `var(--solar-color, currentColor)`. When the provider sets the var, it is defined and the icon uses it.
3. **Direct CSS parent** (only when the icon is `isolated` or no provider exists). The `isolated` prop forces `currentColor` on the icon, which resolves to the closest CSS ancestor's `color` property.
4. **System default** (`24px`, `currentColor`, `1.5`).
### Example [#example]
```jsx
{/* → red (provider) */}
{' '}
{/* → blue (isolated resets var, inherits currentColor from button) */}
{/* → yellow (prop wins over everything) */}
```
- `ArrowUpIcon` reads `var(--solar-color, currentColor)`. The provider sets `--solar-color: red`. The var is defined, so the icon uses **red**.
- `ArrowDownIcon isolated` skips the provider's CSS var entirely. The SVG's `color` attribute is set to `currentColor`, which resolves to the button's `color: blue`. The icon uses **blue**.
- `ArrowLeftIcon color="yellow"` sets inline `color: yellow` on the SVG. Inline style beats everything. The icon uses **yellow**.
## Isolated mode [#isolated-mode]
Set `isolated` on an icon to disconnect it from `SolarProvider`. The icon then reads its values from its CSS parent (via `currentColor` for color) and uses hardcoded defaults for size and stroke.
```jsx
```
When `isolated` is `true`:
- Color: `currentColor`. Resolves to the closest CSS ancestor's `color` property
- Size: `24px` (hardcoded)
- Stroke width: `1.5` (hardcoded)
- Duotone CSS variables: `initial` (re-initialized to browser default)
Use `isolated` when:
- An icon sits inside a styled parent (button, link, card) and should match that parent's color
- An icon is rendered in a portal or shadow DOM where CSS variable inheritance breaks
- You want a subtree of icons to diverge from the global theme
## Provider nesting [#provider-nesting]
Nest `SolarProvider` components to override values for a subtree.
```jsx
{/* Icons here: blue, 24px */}
{/* Icons here: red, 16px */}
{/* Icons here: blue, 24px — back to the outer provider */}
```
The CSS variable cascade handles the nesting. The innermost provider's wrapper `
` has higher specificity for the icons inside it than the outer provider, because it sits closer in the DOM tree.
## Provider is optional [#provider-is-optional]
`SolarProvider` is not required. Every icon resolves its style from props first, then CSS variables, then system defaults. Leave the provider out and pass props directly:
```jsx
```
## SSR and Server Components [#ssr-and-server-components]
Because the provider uses CSS variables, the wrapper `
` does not change after mount. The provider and its icons render on the server as plain HTML. Only `useSolar`, the hook that reads and writes provider state, requires a client component.
```tsx
// Server Component: ✅
import { HeartIcon } from '@solar-icons/react/bold'
export default function Page() {
return
}
// Client Component (only if you need useSolar):
;('use client')
import { useSolar } from '@solar-icons/react'
export function ThemeToggle() {
const { setColor } = useSolar()
return
setColor('#ef4444')}>Red
}
```
## Duotone defaults [#duotone-defaults]
Duotone icons (`BoldDuotone`, `LineDuotone`) have a secondary accent path. The CSS variables for this accent have built-in fallbacks:
- `--solar-secondary-color` defaults to `currentColor`. Without a provider, the accent inherits the icon's primary color.
- `--solar-secondary-opacity` defaults to `0.5`. This is the standard Solar duotone look.
Set `secondaryColor` and `secondaryOpacity` on the provider or individual icons to override.
## CSS classes [#css-classes]
Every icon renders with two classes:
| Class | Applies to |
| ---------------------- | ------------------------------ |
| `solar` | Every icon |
| `solar-{name}-{style}` | Every icon (static or dynamic) |
**Static icons** carry the style from the import path: `@solar-icons/react/bold` produces `solar solar-heart-bold`.
**Dynamic icons** (`@solar-icons/react/dynamic`) don't add their own class. Internally, they render a static component that carries the class matching the active weight. So `
` produces `solar solar-heart-linear`, and switching to `weight="Bold"` changes it to `solar solar-heart-bold`.
Use `.solar` for global icon styling. Use `.solar-heart-bold` to target a specific icon in a specific style.
```css
.solar {
vertical-align: middle;
}
.solar-heart-bold {
color: #ef4444;
}
```
## Framework notes [#framework-notes]
### React, Vue, Solid [#react-vue-solid]
`SolarProvider` renders a `
` with `display: contents` and sets CSS variables as inline `style` values. `useSolar()` returns setters that update these variables.
### Svelte [#svelte]
Provider props are `$bindable()`. Two-way binding lets you drive the provider from external state:
```svelte
```
### Angular [#angular]
`
` is a standalone component with signal-based inputs. It injects `SolarService` which holds the values as Angular `signal`s. The `useSolar()` function returns the same `SolarService` instance.
### React Native [#react-native]
React Native has no CSS variables. `SolarProvider` uses React Context and `useState`. Values resolve through `prop → context → default`. The cascade model does not apply. Each icon reads its value explicitly from the nearest ancestor provider.
# AI Tools (/docs/v2/ai-tools)
Solar Icons provides local tools for both developers and coding agents. The CLI and MCP server use the same static catalog, so icon names, styles, and framework snippets stay aligned with the packages.
## CLI [#cli]
Use `@solar-icons/cli` to search the catalog, inspect an icon, generate an import or SVG, and list available categories and styles.
Install it as a development dependency:
```bash
pnpm add -D @solar-icons/cli
```
Or run it without adding it to your project:
```bash
npx @solar-icons/cli search "shopping cart" --limit 10
```
Useful commands:
| Command | Purpose |
| ---------------- | ------------------------------------------------------------ |
| `search ` | Find icons by name, tags, or category. |
| `get ` | Get an icon import snippet and SVG output. |
| `list` | List icons, optionally filtered by category or style. |
| `info ` | Show metadata and import paths for an icon. |
| `categories` | List all catalog categories. |
| `styles` | List the six available styles and provider tokens. |
| `overview` | Show catalog, package, Figma, and documentation information. |
Pass `--framework` to get a framework-specific snippet and `--json` for machine-readable output:
```bash
npx @solar-icons/cli search "arrow" --style linear --framework react --json
npx @solar-icons/cli get home --style bold --framework vue
npx @solar-icons/cli info arrow-up --json
```
The catalog is read locally from `@solar-icons/static`. Once the package is installed, searches do not require an API key or a network request.
## MCP [#mcp]
Use `@solar-icons/mcp` when your AI client supports the Model Context Protocol. The server communicates over standard input and output and exposes the catalog without running a web service.
Add this server to your MCP client configuration:
```json
{
"mcpServers": {
"solar-icons": {
"command": "npx",
"args": ["-y", "@solar-icons/mcp"]
}
}
}
```
The server exposes these tools:
| Tool | Purpose |
| ----------------------- | -------------------------------------------------------------- |
| `solar_search_icons` | Search by name, tags, or category. |
| `solar_get_icon` | Return an import snippet, CDN URL, and SVG for one icon. |
| `solar_list_icons` | List icons, optionally filtered by category. |
| `solar_info_icon` | Show metadata and all framework import paths. |
| `solar_overview` | Return catalog, package, Figma, and documentation information. |
| `solar_list_categories` | List the 37 catalog categories. |
| `solar_list_styles` | List the six styles and provider tokens. |
Run the server directly when testing a local MCP setup:
```bash
npx -y @solar-icons/mcp
```
The process is intentionally silent on standard output apart from MCP messages. Use an MCP inspector or your client to call the tools.
## Skills [#skills]
Install the Solar Icons skill in a coding-agent environment:
```bash
npx skills add saoudi-h/solar-icons --skill solar-icons
```
The skill teaches an agent to:
- detect the framework and choose the matching Solar Icons package;
- search the catalog with `npx @solar-icons/cli` instead of guessing icon names;
- choose a static or dynamic style import;
- use CSS variables, `SolarProvider`, duotone props, and stroke width correctly;
- load framework-specific references when an import or migration needs more detail.
The source and installation details are available on [skills.sh](https://skills.sh/saoudi-h/solar-icons).
## Migrate to v2 [#migrate-to-v2]
For an existing v1 project, use [`@solar-icons/codemod`](/docs/v2/migration-to-v2/codemod) before the framework migration guide. It previews deterministic changes, supports interactive and JSON modes, and reports cases that still need a manual decision.
# Changelog (/docs/v2/community/changelog)
## React [#react]
@solar-icons/react on GitHub →
### v2.3.3 [#v233]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200]
Release on GitHub →
- **Other:** - **`@solar-icons/react-perf` is merged into `@solar-icons/react` and discontinued.** Replace `@solar-icons/react-perf` imports with `@solar-icons/react`. The migration codemod does this automatically.
- **Other:** - **`/ssr` entry removed.** Use dynamic icons (`@solar-icons/react/dynamic`) for runtime weight switching.
- **Other:** - **Per-style import paths.** Category imports and the top-level `styled` export are gone. Import per style (`@solar-icons/react/bold`) or per icon (`@solar-icons/react/bold/home`).
- **Other:** - **`Icon` suffix on every component name.** `Home` is now `HomeIcon`.
- **Other:** - **`mirrored` prop removed.**
- **Other:** - **Duotone props renamed.** `duotoneColor`/`duotoneOpacity` → `secondaryColor`/`secondaryOpacity`.
- **Other:** - **Icon renames.** Some icon names changed (`weigher` → `scale`, ...). See the [migration guide](https://solar-icons.vercel.app/docs/v2/migration-to-v2/icon-renames).
- **Other:** - **ESM-only.** `require()` no longer works.
- **Other:** - **`` + `useSolar()`** with CSS-variable theming (`--solar-color`, `--solar-size`, `--solar-stroke-width`, `--solar-secondary-color`, `--solar-secondary-opacity`).
- **Other:** - **Dynamic icons** (`@solar-icons/react/dynamic`) with runtime `weight` switching.
- **Other:** - **Migration codemod**: `npx @solar-icons/codemod` migrates v1 projects automatically.
- **Fix:** fix: resolve inline style specificity preventing utility classes from overriding icon size
- **Fix:** - update readme files
### v2.1.1 [#v211]
Release on GitHub →
- **Fix:** fix: logout Bold icon
### v2.1.0 [#v210-1]
Release on GitHub →
- **Feature:** Fix spelling errors and rename icons across the monorepo. This includes correcting typos like Magnifer -> Magnifier and providing deprecated aliases for backwards compatibility.
- **Fix:** Fix: properly generate deprecated aliases for JSDoc (force release).
- **Fix:** Fix: properly generate @deprecated JSDoc for aliased icons and ensure they are exported.
- **Fix:** - chore: graduation from beta to stable release
### v2.0.3 [#v203]
Release on GitHub →
- **Fix:** - Update tsdown config to generate proper lib/\* exports structure
### v2.0.2 [#v202-1]
Release on GitHub →
- **Fix:** - Refactor icon generation system with improved file structure and naming
### v2.0.1 [#v201-1]
Release on GitHub →
- **Fix:** - Optimize tree-shaking with explicit exports and unbundle build.
### v2.0.0 [#v200-1]
Release on GitHub →
- **Breaking:** - Migrate to ESM-only, remove CJS support
### v1.0.0 [#v100]
Release on GitHub →
- **Breaking:** Initial major release: Optimized React package for Solar Icons, supporting flexible imports and improved performance.
## Vue [#vue]
@solar-icons/vue on GitHub →
### v2.3.3 [#v233-1]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-1]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-1]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-1]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-1]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210-2]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.3 [#v203-1]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.2 [#v202-2]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-2]
Release on GitHub →
- **Fix:** - Publish the stable release as 2.0.1: the `2.0.0` version string cannot be republished because an unpublished 2025 build left a permanent tombstone on the npm registry (E400 "Cannot publish over previously published version").
### v2.0.0 [#v200-2]
Release on GitHub →
- **Other:** - **Named exports everywhere.** Per-file default imports (`import HomeBold from ...`) are replaced by named exports (`import { HomeBoldIcon } from ...`).
- **Other:** - **Per-style import paths.** Category imports are gone. Import per style (`@solar-icons/vue/bold`) or per icon (`@solar-icons/vue/bold/home`).
- **Other:** - **`Icon` suffix on every component name.** `Home` is now `HomeIcon`.
- **Other:** - **`mirrored` prop removed.**
- **Other:** - **Duotone props renamed.** `duotoneColor`/`duotoneOpacity` → `secondaryColor`/`secondaryOpacity`.
- **Other:** - **Icon renames.** Some icon names changed (`weigher` → `scale`, ...). See the [migration guide](https://solar-icons.vercel.app/docs/v2/migration-to-v2/icon-renames).
- **Other:** - **ESM-only.** `require()` no longer works.
- **Other:** - **`` + `useSolar()`** with CSS-variable theming (`--solar-color`, `--solar-size`, `--solar-stroke-width`, `--solar-secondary-color`, `--solar-secondary-opacity`).
- **Other:** - **Dynamic icons** (`@solar-icons/vue/dynamic`) with runtime `weight` switching.
- **Other:** - **Migration codemod**: `npx @solar-icons/codemod` migrates v1 projects automatically.
- **Fix:** fix: resolve inline style specificity preventing utility classes from overriding icon size
- **Fix:** SolarIconsPlugin now applies the configured defaults as `--solar-*` CSS variables on `document.body` (client side), so icons pick up the plugin config without a ``. `useSolar()` works in any component after installing the plugin, and calling `setColor`/`setSize` updates every icon.
- **Fix:** - update readme files
### v1.2.1 [#v121]
Release on GitHub →
- **Fix:** fix: logout Bold icon
### v1.2.0 [#v120]
Release on GitHub →
- **Feature:** Fix spelling errors and rename icons across the monorepo. This includes correcting typos like Magnifer -> Magnifier and providing deprecated aliases for backwards compatibility.
- **Fix:** Fix: properly generate deprecated aliases as separate files to ensure they are exported correctly.
- **Fix:** - chore: graduation from beta to stable release
### v1.1.0 [#v110]
Release on GitHub →
- **Feature:** - Removed unused Nuxt-specific code (simplifies package)
### v1.0.0 [#v100-1]
Release on GitHub →
- **Breaking:** - Initial release of @solar-icons/vue package
## Svelte [#svelte]
@solar-icons/svelte on GitHub →
### v2.3.3 [#v233-2]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-2]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-2]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-2]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-2]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210-3]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202-3]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-3]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200-3]
Release on GitHub →
- **Other:** - **`Icon` suffix on every component name.** `Home` is now `HomeIcon`.
- **Other:** - **Per-style import paths.** Category imports are gone. Import per style (`@solar-icons/svelte/bold`) or per icon (`@solar-icons/svelte/bold/home`).
- **Other:** - **`mirrored` prop removed.**
- **Other:** - **Duotone props renamed.** `duotoneColor`/`duotoneOpacity` → `secondaryColor`/`secondaryOpacity`.
- **Other:** - **Icon renames.** Some icon names changed (`weigher` → `scale`, ...). See the [migration guide](https://solar-icons.vercel.app/docs/v2/migration-to-v2/icon-renames).
- **Other:** - **ESM-only.** `require()` no longer works.
- **Other:** - **`` + `useSolar()`** with CSS-variable theming (`--solar-color`, `--solar-size`, `--solar-stroke-width`, `--solar-secondary-color`, `--solar-secondary-opacity`).
- **Other:** - **Dynamic icons** (`@solar-icons/svelte/dynamic`) with runtime `weight` switching.
- **Other:** - **Migration codemod**: `npx @solar-icons/codemod` migrates v1 projects automatically.
- **Fix:** fix: resolve inline style specificity preventing utility classes from overriding icon size
- **Fix:** Fix the public export maps so every documented entry point resolves to a real published file:
- **Fix:** - update readme files
### v1.1.1 [#v111]
Release on GitHub →
- **Fix:** fix: logout Bold icon
### v1.1.0 [#v110-1]
Release on GitHub →
- **Feature:** Fix spelling errors and rename icons across the monorepo. This includes correcting typos like Magnifer -> Magnifier and providing deprecated aliases for backwards compatibility.
- **Fix:** Fix: properly generate deprecated aliases as separate files to ensure they are exported correctly.
- **Fix:** - chore: graduation from beta to stable release
### v1.0.1 [#v101]
Release on GitHub →
- **Fix:** Fix package publication issues
## Solid [#solid]
@solar-icons/solid on GitHub →
### v2.3.3 [#v233-3]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-3]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-3]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-3]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-3]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210-4]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202-4]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-4]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200-4]
Release on GitHub →
- **Other:** - **`Icon` suffix on every component name.** `Home` is now `HomeIcon`.
- **Other:** - **Per-style import paths.** Category imports are gone. Import per style (`@solar-icons/solid/bold`) or per icon (`@solar-icons/solid/bold/home`).
- **Other:** - **`mirrored` prop removed.**
- **Other:** - **Duotone props renamed.** `duotoneColor`/`duotoneOpacity` → `secondaryColor`/`secondaryOpacity`.
- **Other:** - **Icon renames.** Some icon names changed (`weigher` → `scale`, ...). See the [migration guide](https://solar-icons.vercel.app/docs/v2/migration-to-v2/icon-renames).
- **Other:** - **ESM-only.** `require()` no longer works.
- **Other:** - **`` + `useSolar()`** with CSS-variable theming (`--solar-color`, `--solar-size`, `--solar-stroke-width`, `--solar-secondary-color`, `--solar-secondary-opacity`).
- **Other:** - **Dynamic icons** (`@solar-icons/solid/dynamic`) with runtime `weight` switching.
- **Other:** - **Migration codemod**: `npx @solar-icons/codemod` migrates v1 projects automatically.
- **Fix:** fix: resolve inline style specificity preventing utility classes from overriding icon size
- **Fix:** - update readme files
### v1.0.1 [#v101-1]
Release on GitHub →
- **Fix:** fix: logout Bold icon
## Angular [#angular]
@solar-icons/angular on GitHub →
### v2.3.3 [#v233-4]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-4]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-4]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-4]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-4]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210-5]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202-5]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-5]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200-5]
Release on GitHub →
- **Other:** - **`Icon` suffix on every component name.** `Home` is now `HomeIcon`.
- **Other:** - **Per-style import paths.** Category imports are gone. Import per style (`@solar-icons/angular/bold`) or per icon (`@solar-icons/angular/bold/home`).
- **Other:** - **`mirrored` prop removed.**
- **Other:** - **Duotone props renamed.** `duotoneColor`/`duotoneOpacity` → `secondaryColor`/`secondaryOpacity`.
- **Other:** - **Icon renames.** Some icon names changed (`weigher` → `scale`, ...). See the [migration guide](https://solar-icons.vercel.app/docs/v2/migration-to-v2/icon-renames).
- **Other:** - **ESM-only.** `require()` no longer works.
- **Other:** - **`` + `useSolar()`** with CSS-variable theming (`--solar-color`, `--solar-size`, `--solar-stroke-width`, `--solar-secondary-color`, `--solar-secondary-opacity`).
- **Other:** - **Dynamic icons** (`@solar-icons/angular/dynamic`) with runtime `weight` switching.
- **Other:** - **Migration codemod**: `npx @solar-icons/codemod` migrates v1 projects automatically.
- **Fix:** Bind `ariaLabel` to the `aria-label` attribute and render `titleAttr` (or `alt`) as a `` child on static and dynamic icons, so the documented accessibility inputs actually expose an accessible name. The `SolarIcon` directive now forwards `undefined` values too, so clearing an input resets the icon to its defaults.
- **Fix:** fix: resolve inline style specificity preventing utility classes from overriding icon size
- **Fix:** - update readme files
### v1.0.1 [#v101-2]
Release on GitHub →
- **Fix:** fix: logout Bold icon
## React Native [#react-native]
@solar-icons/react-native on GitHub →
### v2.3.3 [#v233-5]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-5]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-5]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-5]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-5]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210-6]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202-6]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-6]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200-6]
Release on GitHub →
- **Other:** - **No CSS variables.** Theming goes through `` (React context) and props: `prop → provider → default`.
- **Other:** - **`size` is a number only** (pixels).
- **Other:** - **`alt` maps to `accessible` + `accessibilityLabel`** on the SVG.
- **Other:** - **`Icon` suffix on every component name.** `Home` is now `HomeIcon`.
- **Other:** - **Per-style import paths.** Category imports are gone. Import per style (`@solar-icons/react-native/bold`) or per icon (`@solar-icons/react-native/bold/home`).
- **Other:** - **`mirrored` prop removed.**
- **Other:** - **Duotone props renamed.** `duotoneColor`/`duotoneOpacity` → `secondaryColor`/`secondaryOpacity`.
- **Other:** - **Icon renames.** Some icon names changed (`weigher` → `scale`, ...). See the [migration guide](https://solar-icons.vercel.app/docs/v2/migration-to-v2/icon-renames).
- **Other:** - **ESM-only.** `require()` no longer works.
- **Other:** - **`` + `useSolar()`** (React context) for global defaults.
- **Other:** - **Dynamic icons** (`@solar-icons/react-native/dynamic`) with runtime `weight` switching.
- **Other:** - **Migration codemod**: `npx @solar-icons/codemod` migrates v1 projects automatically.
- **Fix:** Fix the public export maps so every documented entry point resolves to a real published file:
- **Fix:** The documented `alt` prop now maps to `accessible` and `accessibilityLabel` on the SVG element, giving the icon an accessible name on iOS and Android.
- **Fix:** - update readme files
### v1.1.1 [#v111-1]
Release on GitHub →
- **Fix:** fix: logout Bold icon
### v1.1.0 [#v110-2]
Release on GitHub →
- **Feature:** Fix spelling errors and rename icons across the monorepo. This includes correcting typos like Magnifer -> Magnifier and providing deprecated aliases for backwards compatibility.
- **Fix:** Fix: properly generate deprecated aliases as separate files to ensure they are exported correctly.
- **Fix:** - chore: graduation from beta to stable release
### v1.0.1 [#v101-3]
Release on GitHub →
- **Fix:** - update README
## JavaScript [#javascript]
@solar-icons/js on GitHub →
### v2.3.3 [#v233-6]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-6]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-6]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-6]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-6]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.0 [#v210-7]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202-7]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-7]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200-7]
Release on GitHub →
- **Fix:** Fix the public export maps so every documented entry point resolves to a real published file:
- **Fix:** - update readme files
## Static [#static]
@solar-icons/static on GitHub →
### v2.3.3 [#v233-7]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.3.2 [#v232-7]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
### v2.3.1 [#v231-7]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
### v2.3.0 [#v230-7]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.2.0 [#v220-7]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.1.1 [#v211-1]
Release on GitHub →
- **Fix:** Correct semantic icon metadata in the published static catalogue, including false-positive tags and category tags, and add a regression guard for reviewed metadata errors. The Figma plugin catalogue must be rebuilt and published manually after the package release.
### v2.1.0 [#v210-8]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
### v2.0.2 [#v202-8]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.1 [#v201-8]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
### v2.0.0 [#v200-8]
Release on GitHub →
- **Feature:** Enrich icon metadata with specific tags to improve search accuracy
- **Fix:** - update readme files
## Nuxt [#nuxt]
@solar-icons/nuxt on GitHub →
### v2.3.3 [#v233-8]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
- **Fix:** - Updated dependencies []:
### v2.3.2 [#v232-8]
Release on GitHub →
- **Fix:** Apply the latest Figma corrections to the generated Solar Icons SVG catalogue.
- **Fix:** - Updated dependencies []:
### v2.3.1 [#v231-8]
Release on GitHub →
- **Fix:** Refresh the generated packages with the latest icon catalogue, enriched metadata, and corrected public inventory counts.
- **Fix:** - Updated dependencies []:
### v2.3.0 [#v230-8]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
- **Fix:** - Updated dependencies []:
### v2.2.0 [#v220-8]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
- **Fix:** - Updated dependencies []:
### v2.1.0 [#v210-9]
Release on GitHub →
- **Feature:** Add the next curated Solar extension batch: barcode, barcode-scan, binoculars, bot, brain,
- **Fix:** add the extended `add`, `minus`, `close`, `exclamation-mark`, and
- **Fix:** - Updated dependencies [, ]:
### v2.0.3 [#v203-2]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
- **Fix:** - Updated dependencies []:
### v2.0.2 [#v202-9]
Release on GitHub →
- **Fix:** fix: correct the ticket-star icon name, preserve ticker-star compatibility exports, and refresh logout Bold SVG
- **Fix:** - Updated dependencies []:
### v2.0.1 [#v201-9]
Release on GitHub →
- **Fix:** - Republish as 2.0.1 so the pinned `@solar-icons/vue` dependency resolves: the published 2.0.0 pinned `@solar-icons/vue` at the exact (unavailable) `2.0.0` version.
- **Fix:** - Updated dependencies []:
### v2.0.0 [#v200-9]
Release on GitHub →
- **Other:** - **Module options reworked.** `color`, `size`, `strokeWidth`, `weight` were removed from `SolarNuxtModuleOptions` in early v2 betas; the final API is `namePrefix`, `autoImport`, `provider` (default `true`), and the styling options `color`, `size`, `strokeWidth`, `secondaryColor`, `secondaryOpacity` (applied when `provider: true`).
- **Other:** - **Auto-imported names changed.** `{prefix}{IconName}{Style}Icon` for the main barrel, `{prefix}{IconName}Icon` for dynamic icons.
- **Other:** - **`mirrored` option removed.**
- **Other:** - **Global provider mode** (`provider: true`): the module provides a global `SolarState` and writes `--solar-*` variables on `document.body` (client side). `useSolar()` works anywhere.
- **Other:** - **Dynamic icons** auto-imported with runtime `weight` switching.
- **Other:** - **`#solar-icons` aliases** for explicit imports with full TypeScript support.
- **Fix:** Keep the module defaults (color `currentColor`, size 24, stroke width 1.5, secondary color `currentColor`, secondary opacity 0.5) when only some styling options are set on `solarIcons`, instead of dropping the unset ones. The module now also warns when styling options are ignored because `provider: false` is set.
- **Fix:** - update readme files
- **Fix:** - Updated dependencies [, , ]:
### v1.2.1 [#v121-1]
Release on GitHub →
- **Fix:** fix: logout Bold icon
- **Fix:** - Updated dependencies []:
### v1.2.0 [#v120-1]
Release on GitHub →
- **Feature:** Fix spelling errors and rename icons across the monorepo. This includes correcting typos like Magnifer -> Magnifier and providing deprecated aliases for backwards compatibility.
- **Fix:** - chore: graduation from beta to stable release
- **Fix:** - Updated dependencies [, ]:
### v1.1.3 [#v113]
Release on GitHub →
- **Fix:** - Moving @solar-icons/vue from peerDependency to direct dependency simplifies installation to a single package and ensures version compatibility, following Nuxt module best practices.
### v1.1.2 [#v112]
Release on GitHub →
- **Fix:** - Fix runtime plugin reference after TS to JS build conversion
### v1.1.1 [#v111-2]
Release on GitHub →
- **Fix:** - The --stub flag was causing build issues in the prepack script. This patch removes it to ensure proper package building during prepack phase.
### v1.1.0 [#v110-3]
Release on GitHub →
- **Feature:** - Critical dependency bug fix
### v1.0.0 [#v100-2]
Release on GitHub →
- **Fix:** - Updated dependencies []:
## Codemod [#codemod]
@solar-icons/codemod on GitHub →
### v2.2.1 [#v221]
Release on GitHub →
- **Fix:** Validate the npm OIDC trusted publishing configuration in the release workflow. No functional change.
### v2.2.0 [#v220-9]
Release on GitHub →
- **Feature:** Refresh the icon catalogue and generated framework packages with the latest SVG quality corrections. Add the canonical `chart-square-2` name while preserving `chat-square-2` as a deprecated compatibility alias, and keep the codemod and package metadata aligned with the updated catalogue.
### v2.1.0 [#v210-10]
Release on GitHub →
- **Feature:** Expand the catalogue from 1,268 to 1,379 icons across all six styles, including the shadcn/ui coverage extensions and family variants. Preserve non-breaking file and chat naming changes through deprecated aliases, normalize those aliases during codemod migrations, and expose the updated catalogue across the CLI, MCP, static, and framework packages.
### v2.0.0 [#v200-10]
Release on GitHub →
- **Fix:** Migrate every Solar Icons v1 dependency in a section, not just `@solar-icons/react-perf`: projects with react-perf plus Vue, React, React Native, or other framework packages in the same dependency section were previously left partially migrated.
- **Fix:** Add the Solar Icons v2 migration CLI with conservative adapters for React, React Native, Vue, Nuxt, Svelte, Solid, and Angular. It supports both an interactive migration assistant and deterministic flags for scripts and CI.
- **Fix:** Run the migration CLI correctly when installed through npm or invoked with `npx @solar-icons/codemod`.
# Contributing (/docs/v2/community/contributing)
Currently, the project is developed and maintained by a single developer. Contributions are welcome. Follow the [contribution guidelines](https://github.com/saoudi-h/solar-icons/blob/main/CONTRIBUTING.md) on GitHub.
# License (/docs/v2/community/license)
This library is licensed under the [MIT License](https://github.com/saoudi-h/solar-icons/blob/main/LICENSE). Free for personal and commercial use. The Solar icon pack is licensed under **CC BY 4.0** by **480 Design**, which allows commercial use with attribution. Visit the [480 Design Figma page](https://www.figma.com/community/file/1166831539721848736) to explore the original icon set. See the [LICENSE-THIRD-PARTY](https://github.com/saoudi-h/solar-icons/blob/main/LICENSE-THIRD-PARTY) file for details.
# Figma Plugin (/docs/v2/figma-plugin)
The Solar Icons Figma plugin gives you the same standardized SVGs that ship in the Solar Icons packages. Search the collection, preview each style, and insert icons into your current page without leaving Figma.
[Install Solar Icons from Figma Community](https://www.figma.com/community/plugin/1664759238792120976)
## Browse the collection [#browse-the-collection]
Search by icon name, category, and related terms. Filter the 1,451 icons by any of the six styles:
- Linear
- Broken
- Line Duotone
- Outline
- Bold
- Bold Duotone
## Insert icons [#insert-icons]
Choose **Insert on click** to add an icon as soon as you select it.
Choose **Select first** when you want to select several icons, then add them together. The plugin places the selected icons around the center of your viewport and groups the operation into one undo step.
## Set geometry before insertion [#set-geometry-before-insertion]
Use the Geometry controls to set icon size from 8 to 256 px. Drag each value horizontally, use the arrow keys, or double-click to restore its default value.
Linear, Broken, and Line Duotone icons also support a stroke width from 0.5 to 4 px. The grid updates its preview while you adjust the value. Inserted icons retain editable Figma strokes.
Outline, Bold, and Bold Duotone use filled geometry, so the stroke width setting does not apply to them.
## Preferences and local data [#preferences-and-local-data]
Choose the Figma system theme or force the plugin into light or dark mode. **Reset settings** restores the insertion mode, theme, icon size, and stroke width to their initial values.
The plugin embeds its icon library and makes no network requests. It stores only these preferences in Figma local storage. It does not collect, transmit, or analyze your document content.
## Design and code use the same assets [#design-and-code-use-the-same-assets]
The SVGs inserted by the plugin match the maintained Solar Icons distribution used by the React, Vue, Svelte, Solid, Angular, Nuxt, React Native, JavaScript, and Static packages.
# Categories (/docs/v2/icon-reference/categories)
Every icon belongs to one category. Pick a category to open the [Icons page](/icons) on that category, with live style switching, color controls, and duotone configuration.
| Category | Icons |
| --------------------------------------------------------------- | ----- |
| [Arrows](/icons?view=grouped&category=arrows) | 74 |
| [Arrows Action](/icons?view=grouped&category=arrows-action) | 72 |
| [Astronomy](/icons?view=grouped&category=astronomy) | 32 |
| [Building](/icons?view=grouped&category=building) | 7 |
| [Business](/icons?view=grouped&category=business) | 28 |
| [Call](/icons?view=grouped&category=call) | 21 |
| [Devices](/icons?view=grouped&category=devices) | 91 |
| [Faces](/icons?view=grouped&category=faces) | 21 |
| [Files](/icons?view=grouped&category=files) | 39 |
| [Folders](/icons?view=grouped&category=folders) | 32 |
| [Food](/icons?view=grouped&category=food) | 18 |
| [Hands](/icons?view=grouped&category=hands) | 5 |
| [Home](/icons?view=grouped&category=home) | 35 |
| [IT](/icons?view=grouped&category=it) | 62 |
| [Like](/icons?view=grouped&category=like) | 18 |
| [List](/icons?view=grouped&category=list) | 36 |
| [Map](/icons?view=grouped&category=map) | 37 |
| [Medicine](/icons?view=grouped&category=medicine) | 33 |
| [Messages](/icons?view=grouped&category=messages) | 63 |
| [Money](/icons?view=grouped&category=money) | 35 |
| [Nature](/icons?view=grouped&category=nature) | 9 |
| [Notes](/icons?view=grouped&category=notes) | 30 |
| [Notifications](/icons?view=grouped&category=notifications) | 7 |
| [Parts](/icons?view=grouped&category=parts) | 20 |
| [School](/icons?view=grouped&category=school) | 34 |
| [Search](/icons?view=grouped&category=search) | 21 |
| [Security](/icons?view=grouped&category=security) | 48 |
| [Settings](/icons?view=grouped&category=settings) | 34 |
| [Shopping](/icons?view=grouped&category=shopping) | 27 |
| [Sports](/icons?view=grouped&category=sports) | 41 |
| [Text Formatting](/icons?view=grouped&category=text-formatting) | 36 |
| [Time](/icons?view=grouped&category=time) | 27 |
| [Tools](/icons?view=grouped&category=tools) | 31 |
| [UI](/icons?view=grouped&category=ui) | 162 |
| [Users](/icons?view=grouped&category=users) | 22 |
| [Video](/icons?view=grouped&category=video) | 107 |
| [Weather](/icons?view=grouped&category=weather) | 36 |
Looking for a specific icon? [Search all 1,451 icons](/icons).
# Solar Icons (/docs/v2)
Solar Icons gives you 1,451 distinct icons in six styles: **Bold**, **Linear**, **Outline**, **BoldDuotone**, **LineDuotone**, and **Broken**. With 8,706 total variations.
## Packages [#packages]
## AI tools [#ai-tools]
Use Solar Icons from the terminal, connect it to an MCP client, or give a coding agent a catalog-aware skill.
## What changed in v2 [#what-changed-in-v2]
The v2 release unifies the library under a single API across every framework.
- **One package per framework.** `@solar-icons/react`, `@solar-icons/vue`, `@solar-icons/svelte`, `@solar-icons/solid`, `@solar-icons/angular`, `@solar-icons/react-native`, and `@solar-icons/nuxt`. Laravel Blade ships as `solar-icons/blade` on Packagist. Rails ships as `solar_icons` on RubyGems. Flutter ships as `flutter_solar_icons` on pub.dev. Framework-free options: `@solar-icons/static` and `@solar-icons/js`. V2 merges `@solar-icons/react-perf` into `@solar-icons/react`.
- **Classic mode by default.** Every icon ships with a single style per component, tree-shakable at the import level. Dynamic style switching uses a separate `dynamic` import path.
- **CSS variable cascade.** `SolarProvider` sets `--solar-color`, `--solar-size`, `--solar-stroke-width`, and duotone variables on a wrapper element. Icons inherit these through normal CSS inheritance, no re-renders on change.
- **Duotone built in.** `secondaryColor` and `secondaryOpacity` props control the duotone accent path.
- **Stroke width control.** Linear, Broken, and LineDuotone icons accept `strokeWidth`. Default is `1.5`.
- **`Icon` suffix on component names.** `HomeBoldIcon`, not `Home`. Angular uses a `Solar` prefix (`SolarHomeBold`) instead.
- **Kebab-case import paths.** `@solar-icons/react/bold/heart`, not `@solar-icons/react/Bold/Heart`.
## Icons page [#icons-page]
Browse and search all 1,451 icons with live style previews, color controls, and duotone configuration.
[Explore Icons →](/icons)
## Figma plugin [#figma-plugin]
Browse the complete Solar Icons collection in Figma, preview editable strokes, and insert the same SVGs used by the Solar Icons packages.
[Install the Figma plugin](https://www.figma.com/community/plugin/1664759238792120976)
[Read the Figma plugin guide →](/docs/v2/figma-plugin)
## Migration [#migration]
If you are upgrading from an older version, follow the [migration guide](/docs/v2/migration-to-v2) for a step-by-step walkthrough of every breaking change.
## Acknowledgements [#acknowledgements]
This project wraps the **Solar Icon Set** created by **480 Design**, licensed under [CC BY 4.0](https://www.figma.com/community/file/1166831539721848736).
Design inspiration comes from **Phosphor Icons** and **Lucide Icons**.
# Angular Migration (/docs/v2/migration-to-v2/angular)
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) can rename deterministic Angular imports and selectors in inline or resolvable external templates. It reports templates and API changes it cannot safely infer, which you should complete with this guide.
## Standalone components [#standalone-components]
v2 components are standalone. They were already standalone before v2. No module removal needed.
## Component names [#component-names]
v2 uses `Solar`-prefixed PascalCase imports with style suffixes. Before v2, icons used style-suffixed names without prefix.
**Before (pre-v2):**
```ts
import { HeartBold } from '@solar-icons/angular'
```
**After (v2):**
```ts
import { SolarHeartBold } from '@solar-icons/angular'
```
## SolarProvider [#solarprovider]
v2 adds `` for sharing styling via CSS custom properties:
```ts
import { SolarProvider, SolarHomeBold } from '@solar-icons/angular'
@Component({
standalone: true,
imports: [SolarProvider, SolarHomeBold],
template: `
`,
})
export class AppComponent {}
```
## useSolar [#usesolar]
Child-driven API for components inside ``:
```ts
import { useSolar } from '@solar-icons/angular'
function MyComponent() {
const solar = useSolar()
solar.setColor('#ef4444')
}
```
Set defaults with `` props. In child components, read from `useSolar()` and write to it **only** in response to user events. Initial writes in a child constructor are overridden by the provider's inputs. Avoid them.
## Duotone and stroke width [#duotone-and-stroke-width]
v2 adds duotone support and stroke width control for linear styles:
```html
```
## Additional inputs [#additional-inputs]
v2 icons accept additional inputs:
| Input | Type | Description |
| ------------------ | ------------------ | --------------------------------- |
| `strokeWidth` | `string \| number` | Stroke width (linear styles only) |
| `secondaryColor` | `string` | Duotone accent color |
| `secondaryOpacity` | `number` | Duotone accent opacity |
| `isolated` | `boolean` | Ignores provider CSS variables |
| `alt` | `string` | Accessibility label |
| `ariaLabel` | `string` | `aria-label` attribute |
| `titleAttr` | `string` | Explicit `` text |
Before v2, only `size`, `color`, `alt`, and `mirrored` were available.
## Dynamic rendering (pre-v2) [#dynamic-rendering-pre-v2]
The old `SolarDynamicIcon` directive + `provideSolarIcons` registry is still available, renamed to `SolarIcon`. Works identically. Register icons by name, then render by string or class reference.
```ts
import { SolarIcon, provideSolarIcons } from '@solar-icons/angular'
import { SolarHeartBold } from '@solar-icons/angular'
@Component({
standalone: true,
imports: [SolarIcon],
template: ' ',
providers: [provideSolarIcons({ SolarHeartBold })],
})
export class AppComponent {}
```
## Multi-style dynamic components [#multi-style-dynamic-components]
v2 adds multi-style components that bundle all 6 styles in one component and switch via `weight` input.
Import from the new `@solar-icons/angular/dynamic` entry point:
```ts
import { SolarHome } from '@solar-icons/angular/dynamic'
```
Use them directly in the template:
```html
```
These components are independent of `SolarIcon`. No directive, no registry, no provider needed.
### Which to choose [#which-to-choose]
| Need | Solution |
| ---------------------------------------- | ---------------------------------------------------- |
| One style, one file, minimal bundle | Static component (`SolarHomeBold`) |
| Switch styles at runtime on a known icon | Multi-style component (`SolarHome` from `./dynamic`) |
| Icons from API / CMS / user config | `SolarIcon` directive + `provideSolarIcons` |
## CSS classes [#css-classes]
v2 adds a base CSS class `solar` plus a per-icon variant `solar-{kebab}-{style}` on every icon:
```html
```
Before v2, icons had no CSS classes.
# V2 Codemod (/docs/v2/migration-to-v2/codemod)
`@solar-icons/codemod` helps move a project from v1 to v2. It rewrites deterministic imports and component names, then reports patterns that need a manual decision. It is a migration aid, not a guarantee that every application is fully migrated.
The codemod cannot prove that an application behaves correctly. Run it from a clean working
tree, inspect the diff, then run your typecheck, tests, and production build.
## Migrate a project [#migrate-a-project]
### Preview the migration [#preview-the-migration]
Run the codemod from the root of your project. The first run is read-only: it prints the files it would change and every diagnostic.
```bash
npx @solar-icons/codemod --react-v1-mode static
```
### Apply the reviewed changes [#apply-the-reviewed-changes]
Add `--write` only after reviewing the preview. Commit or stash your work first so the generated diff remains easy to inspect.
```bash
npx @solar-icons/codemod --react-v1-mode static --write
```
### Install and verify v2 [#install-and-verify-v2]
Install the v2 dependencies, remove packages such as `@solar-icons/react-perf` that no longer exist in v2, and run your project's checks.
The command scans application source files and ignores generated folders and dependencies such as `node_modules`, `dist`, and `.git`.
## Use the interactive assistant [#use-the-interactive-assistant]
When migrating by hand, let the assistant detect the project and guide the choices. It asks for a React or Vue strategy only when that framework is present, and asks for confirmation before it writes files.
```bash
npx @solar-icons/codemod --interactive
```
For scripts and CI, use arguments instead. The positional directory is optional, `--cwd` remains available for existing scripts, and `--json` writes a machine-readable report.
```bash
npx @solar-icons/codemod ./apps/web --react-v1-mode static --write
npx @solar-icons/codemod --json > solar-icons-migration.json
```
## Choose the migration mode [#choose-the-migration-mode]
React and Vue v1 components can become either a per-style v2 import or a dynamic v2 import.
- `--react-v1-mode static` is the default. Literal `weight` values become a per-style import, which keeps only that style in the bundle.
- `--react-v1-mode dynamic` keeps a dynamic icon component and its `weight` prop. Choose this when the style genuinely changes at runtime.
- `--vue-v1-mode static` and `--vue-v1-mode dynamic` provide the same choice for Vue.
For example, the static React migration turns this:
```tsx
import { ArrowUp } from '@solar-icons/react'
;
```
into this:
```tsx
import { ArrowUpIcon } from '@solar-icons/react/bold'
;
```
## What it can migrate [#what-it-can-migrate]
The codemod has adapters for React, React-Perf, React Native, Vue, Nuxt, Svelte, Solid, and Angular. It handles known icon renames, common v1 import paths, the React-Perf package consolidation, Nuxt's `namePrefix` configuration, and deterministic Angular selectors in inline and resolvable external templates.
It also updates matching v1 package ranges in `package.json`. Install the v2 packages afterward, then remove packages such as `@solar-icons/react-perf` that no longer exist in v2.
## Review every diagnostic [#review-every-diagnostic]
Some v1 patterns have no single safe v2 equivalent. The codemod leaves those decisions to you and prints a warning with a file, line, and column. Pay particular attention to:
- category and namespace imports that could include far more icons than intended;
- providers and context APIs whose v2 design differs from v1;
- runtime-dependent styles when using static mode;
- the removed `mirrored` prop;
- Angular templates that cannot be resolved from their component source.
Use the framework migration guide to complete those cases manually. The codemod intentionally prefers a clear warning over guessing and silently changing application behavior.
## Verify the result [#verify-the-result]
A successful codemod run is not a replacement for application-level verification. Check templates, providers, dynamic component usage, and bundle size in the project that uses them.
## Framework guides [#framework-guides]
Follow the matching [migration guide](/docs/v2/migration-to-v2) after the automated pass. It documents the API changes and manual steps for each framework.
# Icon Renames (/docs/v2/migration-to-v2/icon-renames)
V2 removed 37 icon names without keeping deprecated aliases. Code that imports one of the old names will fail to compile.
## Renames from issue #493 [#renames-from-issue-493]
These were typos and inconsistent naming in the Figma source, fixed in V2.
| Old name | New name |
| --------------------------- | -------------------------- |
| `plain` | `plane` |
| `plain-2` | `plane-2` |
| `plain-3` | `plane-3` |
| `file-favourite` | `file-favorite` |
| `folder-favourite-star` | `folder-favorite-star` |
| `folder-favourite-bookmark` | `folder-favorite-bookmark` |
| `gallery-favourite` | `gallery-favorite` |
| `map-point-favourite` | `map-point-favorite` |
| `magic-stick` | `magic-wand` |
| `magic-stick-2` | `magic-wand-2` |
| `magic-stick-3` | `magic-wand-3` |
| `weigher` | `scale` |
| `sort-by-alphabet` | `sort-alphabetically` |
| `wad-of-money` | `money-roll` |
| `globus` | `globe` |
| `trellis` | `vanity` |
| `accumulator` | `car-battery` |
| `bell-bing` | `bell-ring` |
## Renames from the V2 backward-compat shim [#renames-from-the-v2-backward-compat-shim]
These were deprecated aliases in V2 (`@deprecated` exports pointing to the correct name). V2 drops the aliases.
| Old name | New name |
| ------------- | -------------- |
| `magnifer` | `magnifier` |
| `infinity` | `infinite` |
| `condicioner` | `conditioner` |
| `siderbar` | `sidebar` |
| `plaaylist` | `playlist` |
| `pallete` | `palette` |
| `tuneing` | `tuning` |
| `horizontall` | `horizontal` |
| `minimlistic` | `minimalistic` |
| `spedometer` | `speedometer` |
| `happly` | `happy` |
| `clound` | `cloud` |
| `recive` | `receive` |
| `essentional` | `essential` |
## Barrel collision renames [#barrel-collision-renames]
These icons had names ending with a style word (`bold`, `broken`), which caused naming collisions between the main barrel and the dynamic barrel in Nuxt auto-imports. Renamed to eliminate ambiguity.
| Old name | New name |
| -------------------------- | --------------------- |
| `bone-broken` | `bone-fracture` |
| `heart-broken` | `heart-crack` |
| `link-broken` | `unlink` |
| `link-broken-minimalistic` | `unlink-minimalistic` |
| `text` | `text-format` |
## Current catalogue normalizations [#current-catalogue-normalizations]
The catalogue later standardized a few family names without removing the old exports immediately. Current package releases keep these old names as deprecated aliases, while the codemod normalizes them when migrating application code:
| Deprecated name | Canonical name |
| --------------- | -------------------- |
| `code-file` | `file-code` |
| `cloud-file` | `file-cloud` |
| `figma-file` | `file-figma` |
| `chat-dots` | `chat-square-dots` |
| `chat-line` | `chat-square-line` |
| `chat-unread` | `chat-square-unread` |
## Migration [#migration]
In your codebase, replace each old name with the new one in both the import path and the component name.
```jsx
// Before
import { WeigherBoldIcon } from '@solar-icons/react/bold/weigher'
// After
import { ScaleBoldIcon } from '@solar-icons/react/bold/scale'
```
```vue
```
# Migration to v2 (/docs/v2/migration-to-v2)
Solar Icons v2 introduces a unified API across all frameworks, CSS variable cascade, duotone support, and kebab-case import paths. Pick your framework below for a detailed migration walkthrough.
Also see the [icon renames](/docs/v2/migration-to-v2/icon-renames) reference for every icon name change between pre-v2 and v2.
# Nuxt Migration (/docs/v2/migration-to-v2/nuxt)
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) updates the deterministic Nuxt module configuration and reports legacy import patterns that need manual work. Review its preview before making the changes below.
## Module config [#module-config]
**Before:**
```ts
solarIcons: {
prefix: 'Solar'
}
```
**After:**
```ts
solarIcons: {
namePrefix: 'Solar'
}
```
## Auto-import names [#auto-import-names]
Auto-imported components include the style suffix:
**Before:** ` `
**After:** ` `
## Scoped context [#scoped-context]
`useSolar()` must be called inside a `` tree. There is no global context.
## Category and namespace imports removed [#category-and-namespace-imports-removed]
**Before:**
```ts
import * as solar from '#solar-icons/category'
//
```
`#solar-icons/category` and the `solar.*` namespace no longer exist. Import icons individually.
## Vue migration [#vue-migration]
The Nuxt module wraps `@solar-icons/vue`. See the [Vue migration guide](/docs/v2/migration-to-v2/vue) for component API changes.
# React Native Migration (/docs/v2/migration-to-v2/react-native)
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) can rewrite common React Native imports and report unsupported category, namespace, and prop patterns. Review its preview before applying the package and API changes below.
## Import paths [#import-paths]
**After:**
```jsx
import { HomeIcon } from '@solar-icons/react-native/bold'
```
## `size` is always number [#size-is-always-number]
**Before:** `size="32"`
**After:** `size={32}`
## Category imports removed [#category-imports-removed]
**Before:**
```jsx
import { House } from '@solar-icons/react-native/category/buildings/Bold'
```
**After:**
```jsx
import { HouseIcon } from '@solar-icons/react-native/bold/house'
```
## No CSS variables [#no-css-variables]
Values resolve through props or SolarProvider (React Context).
## New: SolarProvider [#new-solarprovider]
```jsx
import { SolarProvider } from '@solar-icons/react-native'
;
```
## New: Duotone and stroke width [#new-duotone-and-stroke-width]
```jsx
```
# React-Perf Migration (/docs/v2/migration-to-v2/react-perf)
`@solar-icons/react-perf` was the pre-v2 performance package: one style per component, tree-shakable, no dynamic switching, no provider. In v2, this model becomes the default. Uninstall `react-perf` and install `react`.
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) can rewrite the common React-Perf import patterns into `@solar-icons/react` v2 imports. Review its diagnostics before removing `@solar-icons/react-perf`; unusual category and namespace patterns still need a manual decision.
## Package [#package]
```bash
npm uninstall @solar-icons/react-perf
npm install @solar-icons/react
```
## Component naming [#component-naming]
Add `Icon` suffix. The style suffix depends on the import path.
**Before (top-level, style suffix in name):**
```jsx
import { HomeBold, SettingsLinear } from '@solar-icons/react-perf'
;
```
**After:**
```jsx
import { HomeBoldIcon } from '@solar-icons/react'
;
```
**Before (per-style, no style suffix in name):**
```jsx
import { Home } from '@solar-icons/react-perf/Bold'
;
```
**After:**
```jsx
import { HomeIcon } from '@solar-icons/react/bold'
;
```
## Import paths [#import-paths]
Style directories use kebab-case: `Bold` → `bold`, `LineDuotone` → `line-duotone`.
## `mirrored` removed [#mirrored-removed]
```jsx
// Before
// After
```
## `size` default changed [#size-default-changed]
Default was `1em`, now `24px`. Explicit sizes work as before.
## New features [#new-features]
`SolarProvider`, `secondaryColor`/`secondaryOpacity` for duotone, and `strokeWidth` are now available. See the [React package page](/docs/v2/packages/react).
# React Migration (/docs/v2/migration-to-v2/react)
The old `@solar-icons/react` bundled every icon with all six styles and switched via `weight="Bold"`. v2 splits the package into two import paths. Pick the one that matches your usage.
- **Per-style path** (default): one style per component, tree-shakable at the import level. Use this for the vast majority of cases. Most apps render an icon in a single style and never switch at runtime.
- **Dynamic path**: a single component per icon that bundles all six styles and switches via `weight`. Use it only when you swap styles at runtime.
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) can migrate deterministic React imports in preview mode and report ambiguous cases. Run it with `--react-v1-mode static` for the recommended per-style output, or choose `dynamic` when weights change at runtime. Complete this guide for provider, SSR, and reported manual changes.
## Import path [#import-path]
Same package, different import paths.
**Before (pre-v2):**
```jsx
import { Heart } from '@solar-icons/react'
;
```
**After (recommended — per-style):**
```jsx
// One component, one style. The lightest bundle you can get.
// Add `Icon` suffix to the component name (API rename, applies everywhere).
import { HeartIcon } from '@solar-icons/react/bold'
;
```
**After (only if you switch styles at runtime — dynamic):**
```jsx
import { HeartIcon } from '@solar-icons/react/dynamic'
;
```
The full set of styles is `'Bold' | 'Linear' | 'Outline' | 'BoldDuotone' | 'LineDuotone' | 'Broken'`. The dynamic import bundles all six. If you render five of them or one, the bundle is the same.
## Component naming [#component-naming]
All v2 components gain an `Icon` suffix.
- Per-style barrel (`@solar-icons/react/bold`) exports `HeartIcon`.
- Top-level barrel (`@solar-icons/react`) exports `HeartBoldIcon` (disambiguated).
- Dynamic barrel (`@solar-icons/react/dynamic`) exports `HeartIcon`.
## Default namespace export removed [#default-namespace-export-removed]
```jsx
// Before — pulls all 7000+ icons into the bundle
import solar from '@solar-icons/react'
;
```
This no longer exists. Import icons individually per style.
## Category imports removed [#category-imports-removed]
```jsx
// Before — imports the entire arrows category, defeats tree-shaking
import { Arrows } from '@solar-icons/react/category'
;
```
**After (recommended — per-style):**
```jsx
import { ArrowUpIcon } from '@solar-icons/react/bold/arrow-up'
;
```
**After (only for runtime switching — dynamic):**
```jsx
import { ArrowUpIcon } from '@solar-icons/react/dynamic/arrow-up'
;
```
## SSR subpath removed [#ssr-subpath-removed]
```jsx
// Before
import { Home } from '@solar-icons/react/ssr'
```
V2 drops the `/ssr` subpath. All icons render on the server by default.
```jsx
import { HomeIcon } from '@solar-icons/react/bold'
```
## New features [#new-features]
`SolarProvider`, `secondaryColor` / `secondaryOpacity`, and `strokeWidth` are now part of every web framework package. See the [React package page](/docs/v2/packages/react) for the full API.
# SolidJS Migration (/docs/v2/migration-to-v2/solid)
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) rewrites deterministic Solid imports and reports category or namespace cases that need a manual choice. Review its preview before following this guide.
## Import paths [#import-paths]
**Before:**
```jsx
import { Home } from '@solar-icons/solid/Bold'
```
**After (per-style):**
```jsx
import { HomeIcon } from '@solar-icons/solid/bold'
```
## Component naming [#component-naming]
All components now use an `Icon` suffix (e.g. `HomeIcon`, `HeartBoldIcon`). Per-style barrel imports (`@solar-icons/solid/bold`) use the short name (`HomeIcon`), top-level imports use the disambiguated name (`HomeBoldIcon`).
Single-file imports use the named export: `@solar-icons/solid/bold/home` exports `HomeIcon`.
## Deprecated: `mirrored` prop removed [#deprecated-mirrored-prop-removed]
V2 drops the `mirrored` prop. Use CSS `transform: scaleX(-1)` instead.
## Category imports removed [#category-imports-removed]
**Before:**
```jsx
import { Bold, Linear } from '@solar-icons/solid/category/arrows'
// Usage:
```
**After:**
```jsx
import { ArrowUpIcon } from '@solar-icons/solid/bold/arrow-up'
import { ArrowDownIcon } from '@solar-icons/solid/linear/arrow-down'
// Usage:
```
## New: SolarProvider [#new-solarprovider]
```jsx
import { SolarProvider } from '@solar-icons/solid'
;
```
## useSolar [#usesolar]
Returns Solid `Accessor`s. Keep `solar` as a single object. Calling `solar.color()` re-evaluates the signal. Destructuring (`const { color } = useSolar()`) snapshots the value and loses reactivity.
```jsx
import { useSolar } from '@solar-icons/solid'
function ColorToggle() {
const solar = useSolar()
return solar.setColor('#ef4444')}>Current: {solar.color()}
}
```
## New: Duotone and stroke width [#new-duotone-and-stroke-width]
```jsx
```
## Dynamic imports (optional) [#dynamic-imports-optional]
Use `@solar-icons/solid/dynamic` only when you swap styles at runtime. For most apps, the per-style path on the previous lines is the right choice.
```jsx
import { HeartIcon } from '@solar-icons/solid/dynamic'
;
```
The dynamic component bundles all six styles. Render one or six, the bundle is the same.
# Svelte Migration (/docs/v2/migration-to-v2/svelte)
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) can rewrite common Svelte imports and reports legacy category syntax for manual migration. Run its preview before applying the Svelte 5 and API changes below.
## Requirements [#requirements]
v2 requires Svelte 5.0+ (runes). If you are on Svelte 4, upgrade Svelte first.
## Import paths [#import-paths]
Kebab-case directories, `.svelte` extension on single-icon imports:
**Before:**
```ts
import Home from '@solar-icons/svelte/Bold/Home.svelte'
```
**After (single icon):**
```ts
import HomeIcon from '@solar-icons/svelte/bold/home'
```
**After (per-style barrel):**
```ts
import { HomeIcon } from '@solar-icons/svelte/bold'
```
**After (top-level):**
```ts
import { HomeBoldIcon } from '@solar-icons/svelte'
```
## Component naming [#component-naming]
All components now use an `Icon` suffix (e.g. `HomeIcon`, `HeartBoldIcon`). Per-style barrel imports (`@solar-icons/svelte/bold`) use the short name (`HomeIcon`), top-level imports use the disambiguated name (`HomeBoldIcon`).
Single-file imports use the default export (Svelte convention). Replace PascalCase with kebab-case: `@solar-icons/svelte/bold/home` (the `.svelte` extension is resolved automatically).
## Category imports removed [#category-imports-removed]
**Before:**
```ts
import { Bold } from '@solar-icons/svelte/category/arrows'
```
**After:**
```ts
import ArrowUpIcon from '@solar-icons/svelte/bold/arrow-up'
```
## Deprecated: `mirrored` prop removed [#deprecated-mirrored-prop-removed]
V2 drops the `mirrored` prop. Use CSS `transform: scaleX(-1)` instead.
## useSolar [#usesolar]
```ts
solar.setColor('#ef4444')}>Red
```
Must be called inside a ``. Keep `solar` as a single object; reading `solar.color` is reactive. Destructuring snapshots the value and loses reactivity.
## Dynamic imports [#dynamic-imports]
Runtime-switchable icons via `@solar-icons/svelte/dynamic`. Use this only when you swap styles at runtime. For most apps, the per-style path on the previous lines is the right choice.
```ts
```
The dynamic component bundles all six styles. Render one or six, the bundle is the same.
## SolarProvider [#solarprovider]
```ts
```
Provider props are `$bindable()` for two-way binding.
## CSS variable cascade [#css-variable-cascade]
`SolarProvider` sets CSS custom properties on a wrapper ``. Icons read these values via `var()` fallbacks. You can override any value on a parent element:
```ts
```
## Duotone and stroke width [#duotone-and-stroke-width]
```ts
```
# Vue Migration (/docs/v2/migration-to-v2/vue)
v2 splits the package into two import paths. Pick the one that matches your usage.
- **Per-style path** (default): one style per component, tree-shakable at the import level. Use this for most apps.
- **Dynamic path**: a single component that bundles all six styles and switches via `weight`. Use it only when you swap styles at runtime.
## Try the codemod first [#try-the-codemod-first]
The [V2 codemod](/docs/v2/migration-to-v2/codemod) can migrate deterministic Vue imports and templates in preview mode. Use `--vue-v1-mode static` for the recommended per-style output, or `dynamic` when a component style changes at runtime. Resolve provider and reported manual changes with this guide.
## Import paths [#import-paths]
Kebab-case style directories.
**Before (pre-v2):**
```js
import { Home } from '@solar-icons/vue/Bold'
```
**After (recommended — per-style):**
```js
import { HomeIcon } from '@solar-icons/vue/bold'
```
**After (only for runtime switching — dynamic):**
```js
import { HomeIcon } from '@solar-icons/vue/dynamic'
```
Top-level barrel exports disambiguated names:
```js
import { HomeBoldIcon } from '@solar-icons/vue'
```
## Component naming [#component-naming]
When the style is in the import path, the name drops the style suffix and gains an `Icon` suffix (`Home` → `HomeIcon`). See the [React migration](/docs/v2/migration-to-v2/react#component-naming) for the full naming rules. Separate icon names were also renamed in v2. See the [Icon Renames page](/docs/v2/migration-to-v2/icon-renames).
## Category imports removed [#category-imports-removed]
```js
// Before — imports the entire category
import { Arrows } from '@solar-icons/vue/category'
```
**After (recommended — per-style):**
```js
import { ArrowUpIcon } from '@solar-icons/vue/bold/arrow-up'
```
**After (only for runtime switching — dynamic):**
```js
import { ArrowUpIcon } from '@solar-icons/vue/dynamic/arrow-up'
```
## `weight` prop removed [#weight-prop-removed]
The pre-v2 single package bundled six styles per component and switched via `weight`. v2 drops `weight` from the per-style path. The dynamic path keeps it.
**Before:**
```vue
```
**After (recommended — per-style, no `weight`):**
```vue
```
**After (only for runtime switching — dynamic, keeps `weight`):**
```vue
```
## `mirrored` prop removed [#mirrored-prop-removed]
Use CSS `scaleX(-1)` instead.
## SolarProvider [#solarprovider]
```vue
```
Vue template props use kebab-case: `stroke-width`, `secondary-color`, `secondary-opacity`.
## Duotone and stroke width [#duotone-and-stroke-width]
```vue
```
# Angular (/docs/v2/packages/angular)
```package-install
@solar-icons/angular
```
Standalone components with signal-based inputs. `Solar`-prefixed PascalCase component names with attribute selectors on `
`.
## Import patterns [#import-patterns]
```ts
// Top-level (all icons + lib)
import { SolarHeartBold, SolarProvider, useSolar } from '@solar-icons/angular'
// Dynamic icons
import { SolarHome } from '@solar-icons/angular/dynamic'
```
## Static components [#static-components]
```ts
import { Component } from '@angular/core'
import { SolarHeartBold } from '@solar-icons/angular'
@Component({
standalone: true,
imports: [SolarHeartBold],
template: ' ',
})
export class AppComponent {}
```
## Duotone [#duotone]
```html
```
## Stroke width [#stroke-width]
Linear, LineDuotone, and Broken styles support `strokeWidth`:
```html
```
## SolarProvider [#solarprovider]
Wrap a subtree to share icon styling via CSS custom properties:
```ts
import { SolarProvider, SolarHomeBold } from '@solar-icons/angular'
@Component({
standalone: true,
imports: [SolarProvider, SolarHomeBold],
template: `
`,
})
export class AppComponent {}
```
| Input | CSS Variable | Fallback |
| ------------------ | --------------------------- | -------------- |
| `color` | `--solar-color` | `currentColor` |
| `size` | `--solar-size` | `24px` |
| `strokeWidth` | `--solar-stroke-width` | `1.5` |
| `secondaryColor` | `--solar-secondary-color` | `currentColor` |
| `secondaryOpacity` | `--solar-secondary-opacity` | `0.5` |
The provider does not set defaults. Icons fall back to these values through CSS when no provider or input is specified.
## useSolar [#usesolar]
Call `useSolar()` inside a component that is a **descendant** of `` to access the provider state. The provider must be an ancestor in the template, not a child.
```ts
import { useSolar } from '@solar-icons/angular'
const solar = useSolar()
solar.setColor('#ef4444')
solar.setSize(32)
solar.setSecondaryColor('#f59e0b')
solar.setSecondaryOpacity(0.4)
```
The component using `useSolar()` must be projected into `` (the provider wraps it):
```html
```
Set defaults with `` props. In child components, read from `useSolar()` and write to it **only** in response to user events. Initial writes in a child constructor are overridden by the provider's inputs. Avoid them.
## Dynamic icons [#dynamic-icons]
Two complementary features share this name but solve different problems.
### Multi-style components [#multi-style-components]
Import a component that bundles all 6 styles and switches via `weight`. Use it directly in your template. No directive needed.
```ts
import { Component } from '@angular/core'
import { SolarHome } from '@solar-icons/angular/dynamic'
@Component({
standalone: true,
imports: [SolarHome],
template: ' ',
})
export class AppComponent {}
```
Available from `@solar-icons/angular/dynamic` (barrel) or `@solar-icons/angular/dynamic/home` (single).
### Dynamic rendering with `SolarIcon` [#dynamic-rendering-with-solaricon]
The `SolarIcon` directive creates icons at runtime from a component class or registered name. Use it when the icon to render is only known at runtime (data-driven, CMS, user config).
```ts
import { Component } from '@angular/core'
import { SolarIcon, provideSolarIcons } from '@solar-icons/angular'
import { SolarHome } from '@solar-icons/angular/dynamic'
import { SolarHeartBold } from '@solar-icons/angular'
@Component({
standalone: true,
imports: [SolarIcon],
template: `
`,
providers: [provideSolarIcons({ SolarHeartBold })],
})
export class AppComponent {
icon = SolarHome
}
```
| Usage | Import | Requires registry |
| ---------------------------- | --------------- | ------------------- |
| `[solarIcon]="SomeClass"` | Class reference | No |
| `solarIcon="'RegisterName'"` | String name | `provideSolarIcons` |
`SolarIcon` accepts `size`, `color`, `strokeWidth`, `weight`, `secondaryColor`, `secondaryOpacity`, `alt`, `ariaLabel`, and `titleAttr`. All forward to the created icon. Clearing an input (setting it to `undefined`) resets the icon to its defaults.
## Icon props [#icon-props]
| Input | Type | Description |
| ------------------ | ------------------ | ---------------------------------------------- |
| `color` | `string` | Icon color |
| `size` | `string \| number` | Width and height |
| `strokeWidth` | `string \| number` | Stroke width |
| `secondaryColor` | `string` | Duotone accent color |
| `secondaryOpacity` | `number` | Duotone accent opacity |
| `isolated` | `boolean` | Ignores provider |
| `alt` | `string` | Accessibility label. Renders `` in SVG. |
| `ariaLabel` | `string` | `aria-label` attribute |
| `titleAttr` | `string` | Explicit `` text |
Angular inputs are camelCase. Bind them in templates with `[strokeWidth]="2"`, not `[stroke-width]`.
## CSS variables [#css-variables]
Icons read from CSS custom properties when explicit inputs are omitted:
```css
:host {
--solar-color: #ef4444;
--solar-size: 32px;
--solar-stroke-width: 2;
}
```
## CSS classes [#css-classes]
Every icon renders with class `solar` plus `solar-{kebab-name}-{style}`. For example, `SolarHeartBold` renders with `solar solar-heart-bold`.
## ESM only [#esm-only]
`@solar-icons/angular` is ESM-only.
# Laravel Blade (/docs/v2/packages/blade)
```bash
composer require solar-icons/blade
```
## Installation [#installation]
Solar Icons Blade uses [Blade Icons](https://github.com/driesvints/blade-icons) under the hood. Please refer to the Blade Icons readme for additional functionality such as caching and default attributes. With over 8,000 shipped SVGs, we strongly recommend enabling [icon caching](https://github.com/driesvints/blade-icons#icon-caching).
## Static icons [#static-icons]
Icons ship in six styles (`linear`, `bold`, `broken`, `outline`, `bold-duotone`, `line-duotone`) as self-closing Blade components which compile to inline SVG:
```blade
```
Pass classes and inline styles like any Blade component:
```blade
```
Size icons with `width`/`height` and tune stroke icons with `stroke-width`:
```blade
```
Duotone styles (`bold-duotone`, `line-duotone`) expose a second color through CSS variables, resolved by the browser at render time:
```blade
```
## Dynamic icons [#dynamic-icons]
One component covers every icon and style. Switch styles server-side or render icon names coming from the database:
```blade
```
`weight` defaults to `linear`. Unknown names or weights fail fast with an exception instead of rendering silently broken output.
## PHP helper [#php-helper]
Blade Icons also exposes a PHP-side helper, useful outside templates (mailables, notifications, packages):
```php
svg('solar-linear-heart', 'w-6 h-6', ['stroke-width' => '2'])->toHtml();
```
## PHP enum [#php-enum]
Every canonical icon is available as a typed enum case, useful with Filament and other PHP-driven UIs:
```php
use SolarIcons\Blade\SolarIcon;
svg(SolarIcon::LinearHeart->value)->toHtml();
SolarIcon::LineDuotoneHeart->weight(); // 'line-duotone'
```
## Raw SVG assets [#raw-svg-assets]
Publish the raw SVGs to use them as static assets:
```bash
php artisan vendor:publish --tag=solar-icons-blade --force
```
```blade
```
These files are normalized for framework use: like the components, they ship
without a baked `stroke-width`, so a standalone ` ` renders with the SVG
default stroke width. Prefer the components, or `@solar-icons/static` when you
need the raw artwork with its own defaults.
## Configuration [#configuration]
Publish the config file to set default classes or attributes applied to every icon:
```bash
php artisan vendor:publish --tag=solar-icons-blade-config
```
Shipped SVGs intentionally carry no `class` attribute, so a passed class can never duplicate it. To target all Solar icons at once, set a global class here (e.g. `'class' => 'solar'`).
Found a bug in the PHP layer? Open it in the [blade
repository](https://github.com/solar-icons/blade). For new icon requests and everything else,
use the [main repository](https://github.com/saoudi-h/solar-icons) so all feedback stays in one
place.
# CLI (/docs/v2/packages/cli)
```bash
pnpm add -D @solar-icons/cli
```
## Search [#search]
The CLI searches the maintained catalogue offline, using `@solar-icons/static` as its source of truth:
```bash
npx @solar-icons/cli search "arrow right"
```
## Inspect and export [#inspect-and-export]
List styles, categories, and metadata, and export the exact SVG bodies your build needs. For programmatic use, pass `--json`:
```bash
npx @solar-icons/cli search "arrow right" --json
```
See [`@solar-icons/cli`](https://www.npmjs.com/package/@solar-icons/cli) for the full command reference.
# Codemod (/docs/v2/packages/codemod)
```bash
npx @solar-icons/codemod --interactive
```
## Interactive assistant [#interactive-assistant]
The interactive mode detects supported frameworks, asks for the React and Vue strategy when relevant, and requires confirmation before it writes files.
## Scripted migrations [#scripted-migrations]
Use arguments for scripts, CI, or repeatable migrations. The command previews changes unless `--write` is passed:
```bash
npx @solar-icons/codemod --react-v1-mode static --write
```
See [`@solar-icons/codemod`](https://www.npmjs.com/package/@solar-icons/codemod) for the full migration reference.
# Flutter (/docs/v2/packages/flutter)
```bash
flutter pub add flutter_solar_icons
```
## Static widgets [#static-widgets]
Each icon ships one widget per style. The style is in the import path and in the widget name, and only that style's SVG is embedded:
```dart
import 'package:flutter_solar_icons/linear/home.dart';
HomeLinearIcon(
size: 32,
color: Color(0xFF1C274C),
strokeWidth: 2,
)
```
Style barrels (`linear.dart`, `bold.dart`, `bold_duotone.dart`, `broken.dart`, `line_duotone.dart`, `outline.dart`) and the package root export the same widgets under the same names.
## Dynamic widgets [#dynamic-widgets]
One widget covers every icon and style for names or styles that are only known at runtime. It embeds all six SVGs, so prefer the static widgets when the style is known upfront:
```dart
import 'package:flutter_solar_icons/dynamic/arrow_right.dart';
ArrowRightIcon(
style: SolarIconStyle.boldDuotone,
secondaryColor: Color(0xFF94A3B8),
secondaryOpacity: 0.5,
)
```
Each dynamic widget also exposes its six payloads. Pass one to `SolarIcon` when you want the data directly:
```dart
SolarIcon(HomeIcon.outline, size: 20)
```
## Theme [#theme]
`SolarProvider` sets defaults for icons below it. Arguments on the icon win, then the provider, then the ambient `IconTheme`. Stroke width falls back to `1.5`. `style` also falls back to the provider, so one wrapper can set the style for every dynamic widget inside it; static widgets always draw their own style:
```dart
SolarProvider(
size: 24,
color: Color(0xFF111827),
strokeWidth: 1.5,
style: SolarIconStyle.bold,
child: HomeIcon(),
)
```
Set `isolated: true` to ignore `SolarProvider` and the ambient `IconTheme` and use the package defaults: 24px, `#1C274C`, and a 1.5 stroke.
## Duotone [#duotone]
`boldDuotone` and `lineDuotone` paint a second color on the accent layer. `secondaryColor` defaults to the primary color, `secondaryOpacity` defaults to `0.5`:
```dart
HeartLineDuotoneIcon(
color: Color(0xFF1C274C),
secondaryColor: Color(0xFF94A3B8),
secondaryOpacity: 0.4,
)
```
## Deprecated names [#deprecated-names]
Renamed icons keep working through `@Deprecated` typedefs that point at the canonical widget:
```dart
// Deprecated: use ChatSquareUnreadLinearIcon instead.
ChatUnreadLinearIcon()
```
## Accessibility [#accessibility]
Pass `semanticLabel` to announce the icon to screen readers. Icons without a label are excluded from semantics:
```dart
HomeLinearIcon(semanticLabel: 'Home')
```
# JS (/docs/v2/packages/js)
```package-install
@solar-icons/js
```
## Using a CDN (No Bundler) [#using-a-cdn-no-bundler]
Since Solar Icons contains exactly 8,706 icons across different styles, a traditional global script (UMD) would be massive. Instead, the package is distributed natively as ES Modules (ESM).
You can use it directly in the browser using a modern CDN like [esm.sh](https://esm.sh/):
```html
```
We strongly recommend using `https://esm.sh/@solar-icons/js@` rather than `@latest` to prevent unexpected breaking changes in production.
**What you can accomplish:**
- Replace DOM placeholders with Solar Icons dynamically at runtime
- Pass CSS properties, stroke weights, and colors dynamically
- Build applications without complex framework setups or VDOM overhead
This package uses a highly performant, Lucide-style AST approach to build DOM elements natively via `document.createElementNS()`, avoiding any slow `DOMParser` or `innerHTML` injections.
## Basic Usage [#basic-usage]
Include placeholders in your HTML. Use the `data-solar` attribute with the icon's kebab-case name and style:
```html
```
Then, initialize them in your JavaScript by passing the imported icons to `createIcons`:
```ts
import { createIcons, HeartBoldIcon, AccessibilityLineDuotoneIcon } from '@solar-icons/js'
// This replaces the and tags with fully rendered elements
createIcons({
icons: {
HeartBoldIcon,
AccessibilityLineDuotoneIcon,
},
})
```
## Styling and Attributes [#styling-and-attributes]
You can style the icons directly by passing attributes to the placeholder element.
### Custom Attributes (Recommended) [#custom-attributes-recommended]
Just like our React or Vue packages, you can pass custom attributes directly to the placeholder. These are automatically mapped to inline styles on the injected SVG:
```html
```
### CSS Classes and Global Styling [#css-classes-and-global-styling]
Any classes placed on the placeholder element will be preserved and merged. Furthermore, the injected SVG automatically receives both a generic \`solar\` class and a specific class like \`solar-heart-bold\`.
```html
```
This generates:
```html
```
You can target the \`solar\` class in your global CSS to define default sizing or stroke widths:
```css
.solar {
/* Default styles for all Solar Icons */
width: 24px;
height: 24px;
stroke-width: 1.5;
}
```
## API Reference [#api-reference]
### `createIcons(options)` [#createiconsoptions]
- `icons` (Object): Map of PascalCase icon names to their imported AST structures. **Required**.
- `nameAttr` (string): The HTML attribute used to identify placeholders. Defaults to `'data-solar'`.
- `attrs` (Object): Additional attributes to apply to _every_ injected SVG. This is fully typed and supports custom Solar properties. **Note: CSS classes provided here are merged, not overwritten. The default `solar` classes are preserved.**
```ts
import { createIcons, HeartBoldIcon } from '@solar-icons/js'
createIcons({
icons: { HeartBoldIcon },
nameAttr: 'data-custom-icon', // Optional
attrs: {
// Classes are safely appended alongside "solar solar-heart-bold"
class: 'my-custom-icon-class',
// Fully typed properties that map directly to SVG inline styles
size: 48,
color: '#ef4444',
'secondary-color': '#fca5a5',
'secondary-opacity': 0.8,
'stroke-width': 2,
},
})
```
Because this package dynamically constructs DOM nodes, tree-shaking is fully supported. Only the
icons you explicitly import and pass to `createIcons` will be included in your final bundle.
# MCP (/docs/v2/packages/mcp)
```json
// .vscode/mcp.json, claude_desktop_config.json, etc.
{
"mcpServers": {
"solar-icons": {
"command": "npx",
"args": ["-y", "@solar-icons/mcp"]
}
}
}
```
## Tools [#tools]
The server exposes `solar_*` tools for search, get, list, info, and overview through the Model Context Protocol. All tools use `@solar-icons/static` as their source of truth, so no network is required beyond the `npx` install.
See [`@solar-icons/mcp`](https://www.npmjs.com/package/@solar-icons/mcp) for the full tool reference.
# Nuxt (/docs/v2/packages/nuxt)
```package-install
@solar-icons/nuxt
```
## Installation [#installation]
The module wraps `@solar-icons/vue` and provides:
- **Auto-imported icons:** all 8,706 static icons + 1,451 dynamic icons
- **`SolarProvider`** and **`useSolar`:** auto-imported
- **`#solar-icons` aliases:** for explicit imports with full TypeScript support
- **Provider defaults:** configure default color, size, stroke width from `nuxt.config.ts`
## Module options [#module-options]
| Option | Type | Default | Description |
| ------------------ | ------------------ | ---------------- | ---------------------------------------------------------- |
| `namePrefix` | `string` | `'Solar'` | Prefix for auto-imported component names |
| `autoImport` | `boolean` | `true` | Register all icons as auto-imported components |
| `provider` | `boolean` | `true` | Inject global provider state wrapping the app |
| `color` | `string` | `'currentColor'` | Default icon color (requires `provider: true`) |
| `size` | `string \| number` | `24` | Default icon size (requires `provider: true`) |
| `strokeWidth` | `number` | `1.5` | Default stroke width (requires `provider: true`) |
| `secondaryColor` | `string` | `'currentColor'` | Default duotone accent color (requires `provider: true`) |
| `secondaryOpacity` | `number` | `0.5` | Default duotone accent opacity (requires `provider: true`) |
```ts
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@solar-icons/nuxt'],
solarIcons: {
namePrefix: 'Solar',
autoImport: true,
provider: true,
color: 'currentColor',
size: 24,
strokeWidth: 1.5,
secondaryColor: '#3b82f6',
secondaryOpacity: 0.5,
},
})
```
When `provider: true` (default), the module injects a global `SolarState` into the Nuxt Vue app and writes the configured defaults as `--solar-*` CSS variables on `document.body` (client side). `useSolar()` works in any component without a wrapping ``. Options you do not set fall back to the module defaults above.
When `provider: false`, the styling options are ignored and the module warns about it. Set up the state manually: either call `createSolarIcons` from a Nuxt plugin, or wrap `app.vue` in ``:
```vue
```
## Auto-import [#auto-import]
With `autoImport: true` (default), every icon is available in templates without explicit imports. The module registers two sets of components:
### Main barrel (disambiguated names) [#main-barrel-disambiguated-names]
Pattern: `{prefix}{IconName}{Style}Icon`. Style is always explicit in the name.
```vue
```
### Dynamic icons (runtime style switching) [#dynamic-icons-runtime-style-switching]
Pattern: `{prefix}{IconName}Icon` (no style suffix). These wrap all 6 styles and accept a `weight` prop.
```vue
```
`SolarProvider` and `useSolar` are auto-imported regardless of the `autoImport` setting.
## Explicit imports with #solar-icons aliases [#explicit-imports-with-solar-icons-aliases]
The module registers Nuxt aliases that resolve to `@solar-icons/vue` sub-paths. These work in both `
```
## Entry points [#entry-points]
For consumers outside Nuxt (scripts, tests, other frameworks), the package also exports standard entry points:
| Import path | Re-exports |
| --------------------------------- | -------------------------------- |
| `@solar-icons/nuxt/icons` | `@solar-icons/vue` (main barrel) |
| `@solar-icons/nuxt/icons/{style}` | `@solar-icons/vue/{style}` |
| `@solar-icons/nuxt/dynamic` | `@solar-icons/vue/dynamic` |
| `@solar-icons/nuxt/lib` | `@solar-icons/vue/lib` |
In a Nuxt app, prefer the `#solar-icons` aliases. They resolve at build time and have TypeScript support via the generated tsconfig.
## SolarProvider and useSolar [#solarprovider-and-usesolar]
The provider and composable work identically to the Vue package. See the [Vue documentation](/docs/v2/packages/vue#solarprovider) for props, CSS variables, and usage examples.
With `provider: true` (default), `useSolar()` works anywhere in the app: the module provides a global context through the runtime plugin, and the defaults live on `document.body` as CSS variables.
With `provider: false`, `useSolar()` must be called inside a `` tree that you place yourself. The provider uses scoped `provide`/`inject`; there is no global context.
## ESM only [#esm-only]
`@solar-icons/nuxt` is ESM-only.
# Rails (/docs/v2/packages/rails)
```ruby
# Gemfile
gem "solar_icons"
```
Requires Ruby 3.1+ and Rails 7+. The railtie includes the helper in every view and mailer template, so no initializer is needed.
## Usage [#usage]
The helper embeds the SVG with no network and no JavaScript:
```erb
<%= solar_icon("arrow-right") %>
<%= solar_icon("heart", weight: "bold-duotone", size: 32, class: "icon") %>
```
Options:
- `weight:` one of `linear` (default), `broken`, `line-duotone`, `outline`, `bold`, `bold-duotone`
- `size:` sets `width` and `height` together
- `stroke_width:` overrides the stroke on Linear, Broken, and Line Duotone icons
- `secondary_color:` and `secondary_opacity:` (0 to 1) style the accent layer of the two duotone styles
- `alt:` renders an accessible `` and drops the default `aria-hidden`
- any extra keyword becomes an SVG attribute (`style:`, `class:`, ...); `class:` merges with configured defaults
Unknown names or weights raise an exception instead of rendering broken output.
## Lookup constants [#lookup-constants]
Generated constants keep the catalogue and the six weights discoverable in editors, and typos surface as `NameError`:
```erb
<%= solar_icon(SolarIcons::Icons::ARROW_UP, weight: SolarIcons::Weights::BOLD_DUOTONE) %>
```
`solar_icon` accepts the constants anywhere it accepts name or weight strings. Icon constants are autoloaded, so apps that only pass strings never load them; for runtime enumeration use `SolarIcons.icon_names(style)`.
## Configuration [#configuration]
```ruby
# config/initializers/solar_icons.rb
SolarIcons.configure do |config|
config.default_weight = "linear"
config.default_size = 24
config.default_attrs = { class: "icon" }
end
```
See [`solar_icons`](https://rubygems.org/gems/solar_icons) for the release history.
# React Native (/docs/v2/packages/react-native)
```package-install
@solar-icons/react-native react-native-svg
```
`react-native-svg` is a peer dependency. Install it manually if your project does not already use it.
Renders `` from `react-native-svg`. No CSS variables. Values resolve in JavaScript.
## Import patterns [#import-patterns]
```jsx
// Per-style (no style suffix in name)
import { HeartIcon } from '@solar-icons/react-native/bold'
// Single icon
import { HeartIcon } from '@solar-icons/react-native/bold/heart'
// Top-level (style suffix in name)
import { HeartBoldIcon } from '@solar-icons/react-native'
```
## Basic usage [#basic-usage]
```jsx
import { HeartIcon } from '@solar-icons/react-native/bold'
function App() {
return
}
```
`size` is always a number (pixels).
## Duotone [#duotone]
```jsx
import { HeartIcon } from '@solar-icons/react-native/bold-duotone'
function App() {
return
}
```
## Stroke width [#stroke-width]
```jsx
import { SettingsIcon } from '@solar-icons/react-native/linear'
function App() {
return
}
```
## SolarProvider [#solarprovider]
Uses React Context.
```jsx
import { SolarProvider } from '@solar-icons/react-native'
import { HeartIcon } from '@solar-icons/react-native/bold'
function App() {
return (
)
}
```
| Prop | Fallback | Description |
| ------------------ | ---------------- | ----------------------- |
| `color` | `'currentColor'` | Icon color |
| `size` | `24` | Size in pixels (number) |
| `strokeWidth` | `1.5` | Stroke width |
| `secondaryColor` | `'currentColor'` | Duotone accent color |
| `secondaryOpacity` | `0.5` | Duotone accent opacity |
The provider does not set defaults. Icons fall back to these values when no provider or prop is specified.
## useSolar [#usesolar]
Must be called inside a ``.
```jsx
import { useSolar } from '@solar-icons/react-native'
function ColorToggle() {
const { color, setColor } = useSolar()
return setColor('#ef4444')} />
}
```
## Icon props [#icon-props]
| Prop | Type | Fallback | Description |
| ------------------ | ------------------ | -------------- | --------------------------------------------------------------------------- |
| `color` | `string` | `currentColor` | Icon color |
| `size` | `number` | `24` | Size in pixels (number only) |
| `strokeWidth` | `number \| string` | `1.5` | Stroke width |
| `secondaryColor` | `string` | `currentColor` | Duotone accent color |
| `secondaryOpacity` | `number` | `0.5` | Duotone accent opacity |
| `isolated` | `boolean` | `false` | Ignores provider |
| `alt` | `string` | — | Accessibility label. Maps to `accessible` + `accessibilityLabel` on the SVG |
Omit a prop to fall back to the `SolarProvider` value, then to the fallback listed above.
## Differences from web React [#differences-from-web-react]
- No CSS variables. Resolution: `prop → context → default`.
- `size` is `number` only (pixels).
- Renders `` from `react-native-svg`.
## CSS classes [#css-classes]
React Native does not use CSS classes. Styling is done through props (`color`, `size`, `strokeWidth`) and `SolarProvider` context.
## ESM only [#esm-only]
`@solar-icons/react-native` is ESM-only.
# React (/docs/v2/packages/react)
```package-install
@solar-icons/react
```
## Import patterns [#import-patterns]
```jsx
// Per-style (no style suffix in name - style is in the path)
import { HeartIcon } from '@solar-icons/react/bold'
// Single icon (lighter on the dev server — avoids resolving ~8k modules)
import { HeartIcon } from '@solar-icons/react/bold/heart'
// Top-level (style suffix in name - path doesn't specify style)
import { HeartBoldIcon } from '@solar-icons/react'
// Dynamic (runtime style switching)
import { HeartIcon } from '@solar-icons/react/dynamic'
import { HeartIcon } from '@solar-icons/react/dynamic/heart'
```
## Basic usage [#basic-usage]
```jsx
import { HeartIcon } from '@solar-icons/react/bold'
function App() {
return
}
```
## Duotone [#duotone]
BoldDuotone and LineDuotone styles render a secondary accent path. Control it with `secondaryColor` and `secondaryOpacity`.
```jsx
import { HeartIcon } from '@solar-icons/react/bold-duotone'
function App() {
return
}
```
## Stroke width [#stroke-width]
Linear, Broken, and LineDuotone icons accept `strokeWidth`. Default is `1.5`.
```jsx
import { SettingsIcon } from '@solar-icons/react/linear'
function App() {
return
}
```
## SolarProvider [#solarprovider]
Wrap your app in `SolarProvider` to set defaults. Icons inherit through the CSS cascade without re-rendering.
```jsx
import { SolarProvider } from '@solar-icons/react'
import { HeartIcon } from '@solar-icons/react/bold'
function App() {
return (
)
}
```
The provider sets CSS custom properties on a `` with `display: contents`. Changing a value updates the wrapper only. Icons do not re-render.
### Provider props [#provider-props]
| Prop | CSS Variable | Fallback |
| ------------------ | --------------------------- | -------------- |
| `color` | `--solar-color` | `currentColor` |
| `size` | `--solar-size` | `24px` |
| `strokeWidth` | `--solar-stroke-width` | `1.5` |
| `secondaryColor` | `--solar-secondary-color` | `currentColor` |
| `secondaryOpacity` | `--solar-secondary-opacity` | `0.5` |
The provider does not set defaults. Icons fall back to these values through CSS when no provider or prop is specified.
## useSolar [#usesolar]
Access and change provider values from any descendant component. Must be called inside a `
`.
```jsx
import { useSolar } from '@solar-icons/react'
function ColorToggle() {
const { color, setColor } = useSolar()
return setColor('#ef4444')}>Current: {color}
}
```
## Icon props [#icon-props]
Every icon accepts these props plus standard SVG attributes (`ref`, `className`, `style`, etc.).
| Prop | Type | Description |
| ------------------ | ------------------ | ----------------------------------------------------- |
| `color` | `string` | Icon color. Overrides provider. |
| `size` | `string \| number` | Width and height. Numbers become `{n}px`. |
| `strokeWidth` | `string \| number` | Stroke width for Linear/Broken/LineDuotone. |
| `secondaryColor` | `string` | Duotone accent color. |
| `secondaryOpacity` | `number` | Duotone accent opacity (0–1). |
| `isolated` | `boolean` | Ignores provider. Uses `24px`, `currentColor`, `1.5`. |
| `alt` | `string` | Accessibility label. Renders `` in SVG. |
## Dynamic icons [#dynamic-icons]
```jsx
import { HeartIcon } from '@solar-icons/react/dynamic'
function App() {
return
}
```
The `weight` prop accepts `'Bold' | 'Linear' | 'Outline' | 'BoldDuotone' | 'LineDuotone' | 'Broken'`.
## CSS variables [#css-variables]
Icons resolve styling through CSS custom properties.
| Variable | Role |
| --------------------------- | ------------------------------------------ |
| `--solar-color` | Fill and stroke color |
| `--solar-size` | Width and height |
| `--solar-stroke-width` | Stroke width for Linear/Broken/LineDuotone |
| `--solar-secondary-color` | Secondary color for duotone styles |
| `--solar-secondary-opacity` | Secondary opacity for duotone styles |
## CSS classes [#css-classes]
Every icon renders with two classes:
| Class | Description |
| ---------------------- | ---------------------------------------------------------- |
| `solar` | Present on every icon. Use for global styling. |
| `solar-{name}-{style}` | Specific to the icon and style (e.g., `solar-heart-bold`). |
```css
.solar {
vertical-align: middle;
}
.solar-heart-bold {
color: #ef4444;
}
```
## ESM only [#esm-only]
`@solar-icons/react` is ESM-only. `require()` does not work. Use `import` syntax or `await import()`. All V2 packages follow this convention.
# SolidJS (/docs/v2/packages/solid)
```package-install
@solar-icons/solid
```
## Import patterns [#import-patterns]
```jsx
// Per-style (no style suffix - style in path)
import { HeartIcon } from '@solar-icons/solid/bold'
// Single icon
import { HeartIcon } from '@solar-icons/solid/bold/heart'
// Top-level (style suffix in name)
import { HeartBoldIcon } from '@solar-icons/solid'
```
## Basic usage [#basic-usage]
```jsx
import { HeartIcon } from '@solar-icons/solid/bold'
function App() {
return
}
```
## Duotone [#duotone]
```jsx
import { HeartIcon } from '@solar-icons/solid/bold-duotone'
function App() {
return
}
```
## Stroke width [#stroke-width]
```jsx
import { SettingsIcon } from '@solar-icons/solid/linear'
function App() {
return
}
```
## SolarProvider [#solarprovider]
Uses Solid signals internally.
```jsx
import { SolarProvider } from '@solar-icons/solid'
import { HeartIcon } from '@solar-icons/solid/bold'
function App() {
return (
)
}
```
## useSolar [#usesolar]
Returns Solid `Accessor`s. Must be called inside a ``.
```jsx
import { useSolar } from '@solar-icons/solid'
function ColorToggle() {
const { color, setColor } = useSolar()
return setColor('#ef4444')}>Current: {color()}
}
```
## Icon props [#icon-props]
| Prop | Type | Description |
| ------------------ | ------------------ | ---------------------- |
| `color` | `string` | Icon color |
| `size` | `string \| number` | Width and height |
| `strokeWidth` | `string \| number` | Stroke width |
| `secondaryColor` | `string` | Duotone accent color |
| `secondaryOpacity` | `number` | Duotone accent opacity |
| `isolated` | `boolean` | Ignores provider |
| `alt` | `string` | Accessibility label |
All standard SVG attributes pass through.
## CSS variables [#css-variables]
Same as [React](/docs/v2/packages/react#css-variables).
## CSS classes [#css-classes]
Every icon renders with class `solar` plus `solar-{name}-{style}`. See the [React page](/docs/v2/packages/react#css-classes).
## ESM only [#esm-only]
`@solar-icons/solid` is ESM-only. `require()` does not work.
# Static (/docs/v2/packages/static)
```package-install
@solar-icons/static
```
**What you can accomplish:**
- Embed raw SVGs or an SVG sprite directly in HTML
- Import SVG strings in Node.js applications and server-side rendering
- Build static websites and applications without JavaScript framework dependencies
This package includes the following implementations of Solar Icons:
- Individual SVG files
- SVG sprite
- A JavaScript library exporting SVG strings
- JSON Metadata
## SVG Sprite [#svg-sprite]
The package includes a pre-built sprite containing all the icons. Symbols are named `{kebab-name}-{style}` (e.g. `heart-bold`). The sprite is an external symbol file: inline it on the page, then reference symbols with ``.
#### Basic sprite usage: [#basic-sprite-usage]
```html
```
#### Using a CDN [#using-a-cdn]
Since `@solar-icons/static` is published on npm, you can load individual SVGs or the sprite directly from a CDN like jsDelivr or unpkg:
```html
Solar heart icon
```
` ` cannot navigate to a symbol inside an external sprite. Use the inline `` pattern above for symbols.
#### Inline with CSS helper class [#inline-with-css-helper-class]
If you'd prefer, you can use CSS to hold your base SVG properties. Unlike standard SVG properties, Solar Icons rely on specific CSS variables to control their rendering, especially for duotone styles.
icon.css
index.html
index.js
```css
.solar-icon {
/* Default variables */
--solar-color: currentColor;
--solar-size: 24px;
/* For Linear, Broken and LineDuotone */
--solar-stroke-width: 1.5;
/* For duotone styles */
--solar-secondary-color: currentColor;
--solar-secondary-opacity: 0.5;
width: var(--solar-size);
height: var(--solar-size);
}
```
```html
```
```js
import './icon.css'
// With bundlers like Vite, import the raw SVG string
import sprite from '@solar-icons/static/sprite?raw'
document.getElementById('sprite').innerHTML = sprite
```
## SVG file as string [#svg-file-as-string]
To import an SVG as a string (e.g., for templating). Works in Node.js and in bundlers like Vite and Webpack:
```js
// Per-icon import: style is in the path, the export keeps the style suffix
import { HeartBoldIcon } from '@solar-icons/static/bold/heart'
// Top-level import: same export name
import { HeartBoldIcon } from '@solar-icons/static'
```
The raw `.svg` files themselves are not importable from the package (only the exported subpaths resolve). To embed an SVG file directly, use the CDN URL in an ` ` as shown above.
## Node.js [#nodejs]
You can import Solar Icons as SVG strings directly in Node.js projects. `@solar-icons/static` is an ESM-only package.
```js [ESM]
import { HeartBoldIcon } from '@solar-icons/static'
// Per-icon import for lighter resolution
import { HeartBoldIcon } from '@solar-icons/static/bold/heart'
```
Every icon export name is PascalCase and includes the style suffix (e.g. `HeartBoldIcon`,
`HeartLinearIcon`), whether imported from the top level or from a style subpath.
#### Example with Node.js [#example-with-nodejs]
```js
import http from 'http'
import { HeartBoldDuotoneIcon } from '@solar-icons/static'
const server = http.createServer((req, res) => {
res.statusCode = 200
res.setHeader('Content-Type', 'text/html')
res.end(`
Solar Icons
This is a Solar icon:
${HeartBoldDuotoneIcon}
`)
})
const hostname = '127.0.0.1'
const port = 3000
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`)
})
```
## Metadata & Collections [#metadata--collections]
If you are building an icon picker or need a searchable list, you can import the metadata JSON files.
```ts
// Complete metadata with tags and categories
import metadata from '@solar-icons/static/metadata.json' with { type: 'json' }
// Just the list of icon names and styles
import icons from '@solar-icons/static/icons.json' with { type: 'json' }
```
# Svelte (/docs/v2/packages/svelte)
```package-install
@solar-icons/svelte
```
Requires Svelte 5.0+. Uses runes (`$props`, `$derived`, `$bindable`).
## Import patterns [#import-patterns]
```ts
// Per-style (named, no style suffix - style is in the path)
import { HeartIcon } from '@solar-icons/svelte/bold'
// Single icon (default export, lighter on the dev server)
import HeartIcon from '@solar-icons/svelte/bold/heart'
// Top-level (named, style suffix in name)
import { HeartBoldIcon } from '@solar-icons/svelte'
```
## Basic usage [#basic-usage]
```svelte
```
## Duotone [#duotone]
```svelte
```
## Stroke width [#stroke-width]
```svelte
```
## SolarProvider [#solarprovider]
Provider props support two-way binding (`$bindable`).
```svelte
```
| Prop | CSS Variable | Fallback |
| ------------------ | --------------------------- | -------------- |
| `color` | `--solar-color` | `currentColor` |
| `size` | `--solar-size` | `24px` |
| `strokeWidth` | `--solar-stroke-width` | `1.5` |
| `secondaryColor` | `--solar-secondary-color` | `currentColor` |
| `secondaryOpacity` | `--solar-secondary-opacity` | `0.5` |
The provider does not set defaults. Icons fall back to these values through CSS when no provider or prop is specified.
## Dynamic icons [#dynamic-icons]
The `@solar-icons/svelte/dynamic` path exports runtime-switchable icons (single component per logical icon with a `weight` prop):
```svelte
```
Available weights: `Bold`, `BoldDuotone`, `Broken`, `Linear`, `LineDuotone`, `Outline`.
## useSolar [#usesolar]
Must be called inside a ``.
```svelte
solar.setColor('#ef4444')}>
Current: {solar.color}
```
Keep `solar` as a single object. Reading `solar.color` is reactive because the provider's getter re-evaluates the prop on every access. Destructuring (`const { color } = useSolar()`) snapshots the initial value and loses reactivity.
## Icon props [#icon-props]
| Prop | Type | Description |
| ------------------ | ------------------ | ---------------------- |
| `color` | `string` | Icon color |
| `size` | `string \| number` | Width and height |
| `strokeWidth` | `string \| number` | Stroke width |
| `secondaryColor` | `string` | Duotone accent color |
| `secondaryOpacity` | `number` | Duotone accent opacity |
| `isolated` | `boolean` | Ignores provider |
| `alt` | `string` | Accessibility label |
All standard SVG attributes pass through to the `` element (`class`, `style`, `data-*`, `role`, `aria-*`, etc.).
## CSS variables [#css-variables]
Same as [React](/docs/v2/packages/react#css-variables).
## CSS classes [#css-classes]
Every icon renders with class `solar` plus `solar-{name}-{style}`. See the [React page](/docs/v2/packages/react#css-classes).
## ESM only [#esm-only]
`@solar-icons/svelte` is ESM-only. `require()` does not work.
# Vue (/docs/v2/packages/vue)
```package-install
@solar-icons/vue
```
## Import patterns [#import-patterns]
```js
// Per-style (no style suffix in name - style is in the path)
import { HeartIcon } from '@solar-icons/vue/bold'
// Single icon (lighter on the dev server — avoids resolving ~8k modules)
import { HeartIcon } from '@solar-icons/vue/bold/heart'
// Top-level (style suffix in name)
import { HeartBoldIcon } from '@solar-icons/vue'
// Dynamic (runtime style switching)
import { HeartIcon } from '@solar-icons/vue/dynamic'
```
## Basic usage [#basic-usage]
```vue
```
## Duotone [#duotone]
```vue
```
## Stroke width [#stroke-width]
```vue
```
## SolarProvider [#solarprovider]
```vue
```
| Prop | CSS Variable | Fallback |
| ------------------- | --------------------------- | -------------- |
| `color` | `--solar-color` | `currentColor` |
| `size` | `--solar-size` | `24px` |
| `stroke-width` | `--solar-stroke-width` | `1.5` |
| `secondary-color` | `--solar-secondary-color` | `currentColor` |
| `secondary-opacity` | `--solar-secondary-opacity` | `0.5` |
The provider does not set defaults. Icons fall back to these values through CSS when no provider or prop is specified.
## useSolar [#usesolar]
Returns reactive `Ref`s. Must be called inside a `` or after installing `SolarIconsPlugin`.
```vue
Current: {{ solar.color }}
```
Keep `solar` as a single object. Vue auto-unwraps the `Ref`s when you read them through `solar.color` in the template. Destructuring (`const { color } = useSolar()`) loses reactivity in the template.
## Vue Plugin [#vue-plugin]
The plugin sets global defaults for every icon in the app without a `` wrapper. It writes the five CSS variables on `document.body` and makes `useSolar()` available in every component.
```ts
import { createApp } from 'vue'
import { SolarIconsPlugin } from '@solar-icons/vue/lib'
import App from './App.vue'
const app = createApp(App)
app.use(SolarIconsPlugin, {
color: '#ef4444',
size: 24,
strokeWidth: 1.5,
secondaryColor: '#f59e0b',
secondaryOpacity: 0.5,
})
app.mount('#app')
```
Calling `useSolar().setColor(...)` anywhere in the app updates the variables on `document.body` and restyles every icon.
The variables are written client-side. In server-rendered apps the first paint uses the CSS
fallbacks and the values apply after hydration. For an exact first paint, wrap your app in a
global `` instead, or set the variables in your global CSS.
`` is the scoped alternative: its variables apply to its subtree and win over the plugin's for that subtree. The plugin and a provider can be used together.
## Dynamic icons [#dynamic-icons]
```vue
```
## Icon props [#icon-props]
| Prop | Type | Description |
| ------------------ | ------------------ | ---------------------- |
| `color` | `string` | Icon color |
| `size` | `string \| number` | Width and height |
| `strokeWidth` | `string \| number` | Stroke width |
| `secondaryColor` | `string` | Duotone accent color |
| `secondaryOpacity` | `number` | Duotone accent opacity |
| `isolated` | `boolean` | Ignores provider |
| `alt` | `string` | Accessibility label |
In Vue templates, kebab-case attribute names map to camelCase props (e.g. `:stroke-width="2"` targets `strokeWidth`). Either form works in templates. Use kebab-case in ``, camelCase in `