Skip to content

Icon

Displays SVG icons with style, size, and CDN fallback support.

First release: 1.0.0 Latest update: July 1, 2025 Current version: 1.0.0

React Angular Vue Svelte HTML

Import

import { PlusIcon } from '@plusui/react';
import { PlusIconComponent } from '@plusui/angular';
import { PlusIcon } from '@plusui/vue';
import PlusIcon from '@plusui/svelte';
<script src="https://cdn.jsdelivr.net/npm/@plusui/core"></script>

Package

@plusui/react
@plusui/angular
@plusui/vue
@plusui/svelte
@plusui/core

Docs

Changelog

Icon Changelog

Recent changes and updates for the icon component

v1.0.0

June 28, 2025
Feat

Introduced a new, unified SVG icon system with expanded features.

  • Added a local registry for 32+ core icons with CDN fallback.
  • Implemented `solid`, `regular`, and `light` style variants.
  • Added `sm`, `md`, `lg`, and `xl` size variants.
  • This change is part of the "Icon System Unification" EPIC (#73).

The Icon component (<plus-icon>) provides a consistent and performant way to display SVG icons in Plus UI. It supports multiple style variants (solid, regular, light), size options, and automatic CDN fallback if an icon is not available locally.

Show code

Use the icon-style attribute to switch between solid, regular, and light icon styles:

Show code

Control the icon size using the size attribute or the --icon-size CSS custom property. Color can be set via CSS:

Show code

If the requested icon is not found in the local bundle, it will be automatically loaded from the FontAwesome CDN:

Show code
NameTypeDefaultDescription
icon-namestringName of the icon to display
icon-style'solid' | 'regular' | 'light''solid'Icon style variant
size'xs' | 'sm' | 'md' | ...'md'Size variant or custom CSS value
NameDescription
default(Not typically used)
NameDescription
--icon-sizeSets the icon size
--icon-colorSets the icon color
  • Uses role="img" for screen readers
  • Add aria-label for descriptive icons
  • Use aria-hidden="true" for decorative icons

Why is my icon not showing?

  • If the icon name is incorrect or not available locally, it will attempt to load from the CDN. Double-check the icon name and style.

How do I use a custom SVG?

  • For custom SVGs, use a slot or inline SVG directly in your markup.

Join the Community

Plus UI is built by the community. Join us on our platforms to contribute, get help, and stay up to date.