Skip to main content
VelinStyle v0.8.0
⌂ Home
  1. Docs
  2. Extend
  3. Icons

Icons

VelinStyle includes its own icon system powered by the <velin-icon> web component and an SVG sprite sheet.

Usage

<!-- Basic icon -->
<velin-icon name="heart" size="24"></velin-icon>

<!-- With color -->
<velin-icon name="star" size="20" class="velin-text-warning"></velin-icon>

<!-- Inside a button -->
<button class="btn btn-primary">
  <velin-icon name="download" size="16"></velin-icon> Download
</button>

Available Icons

VelinStyle ships with 200+ icons covering common UI needs:

See the full icon reference in the source SVG sprite for the complete list.

External Icon Providers

Since v0.8.0, <velin-icon> supports loading icons from external providers via CDN. Use the provider attribute:

<!-- Lucide icon -->
<velin-icon name="heart" provider="lucide"></velin-icon>

<!-- Heroicons -->
<velin-icon name="academic-cap" provider="heroicons"></velin-icon>

<!-- Bootstrap Icons -->
<velin-icon name="star-fill" provider="bootstrap"></velin-icon>

<!-- Material Symbols -->
<velin-icon name="home" provider="material"></velin-icon>

<!-- Tabler Icons -->
<velin-icon name="brand-github" provider="tabler"></velin-icon>

Supported Providers

Provider KeyNameLicenseHomepage
lucideLucide IconsISClucide.dev
heroiconsHeroiconsMITheroicons.com
bootstrapBootstrap IconsMITicons.getbootstrap.com
materialMaterial SymbolsApache 2.0fonts.google.com/icons
fontawesomeFont Awesome (Free)CC BY 4.0fontawesome.com
tablerTabler IconsMITtabler.io/icons

Icons are fetched from CDN and cached in memory. If the CDN fails, VelinStyle falls back to the local sprite.

Custom Providers (JS API)

// Register your own provider at runtime
VelinIcon.registerProvider('myicons', 'https://mycdn.com/icons/{name}.svg');

// Then use it in HTML
// <velin-icon name="custom" provider="myicons"></velin-icon>

CLI Icon Management

The VelinStyle CLI provides commands to download and manage icons from external providers into your local SVG sprite:

# List available providers and installed icons
velinstyle icons list

# Download specific icons from a provider
velinstyle icons add lucide --icons heart,star,check,arrow-right

# Download with specific variant
velinstyle icons add heroicons --icons academic-cap --variant solid

# Remove all icons from a provider
velinstyle icons remove lucide

# Rebuild the SVG sprite after changes
velinstyle icons build

Custom Inline Icons

You can also use inline SVG directly:

<svg class="velin-icon" width="24" height="24" viewBox="0 0 24 24">
  <path d="M12 2L2 7l10 5 10-5-10-5z" fill="currentColor"/>
</svg>

Theme wählen