npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mingcute/svelte

v3.0.2

Published

Mingcute SVG icon components for Svelte.

Readme


Overview

@mingcute/svelte provides typed Svelte components for the public Mingcute Core Regular and Core Filled styles.

Canonical icon geometry comes from @mingcute/icons. The adapter focuses on Svelte rendering, accessibility, prop precedence, refs, framework lifecycle behavior, and stable SVG resource identifiers.

Highlights

  • 3,326 styled definitions: 1,663 icons in Core Regular and Core Filled.
  • Typed Svelte components: generated declarations and framework-native props.
  • Tree-shakeable imports: style entry points and direct icon subpaths.
  • Accessible defaults: unlabeled icons remain decorative.
  • Scoped SVG resources: repeated icons avoid gradient, mask, and clip-path collisions.
  • Shared geometry: the adapter does not duplicate the icon catalogue.

Installation

Compatibility: Svelte 5.20 or newer.

# npm
npm install @mingcute/svelte

# pnpm
pnpm add @mingcute/svelte

# Yarn
yarn add @mingcute/svelte

# Bun
bun add @mingcute/svelte

Quick Start

<script lang="ts">
  import { Home1Regular } from '@mingcute/svelte/core-regular';
</script>

<Home1Regular size={24} title="Home" />

Imports

Style entry points

import {
  Home1Regular,
  Search2Regular,
} from '@mingcute/svelte/core-regular';

Direct icon imports

import Home1Regular from '@mingcute/svelte/core-regular/home-1';

The package root exports the shared Icon utility and public types. It does not re-export the complete icon catalogue.

API Reference

| Prop | Type | Default | Purpose | |---|---|---|---| | size | number \| string | 24 | Sets both width and height unless either is provided | | width | Svelte SVG value | size | Overrides the rendered width | | height | Svelte SVG value | size | Overrides the rendered height | | color | string | currentColor | Sets inherited SVG paint | | title | string | none | Adds an accessible <title> | | titleId | string | generated | Overrides the title association ID | | class, className, style | Svelte SVG values | none | Styles the rendered SVG | | ref | SVGSVGElement | none | Supports bind:ref | | Other props | Svelte SVG attributes | none | Forwards SVG, event, and ARIA props |

Explicit width or height values take precedence over size.

Accessibility

Icons without a title or explicit accessible name are hidden from assistive technology.

Meaningful icons

Provide a title or platform-appropriate accessibility label when an icon communicates meaning by itself.

Decorative icons

Keep icons decorative when nearby text already labels the action.

Icon-only controls

Put the accessible name on the interactive control and keep the icon itself decorative.

Server Rendering

Components use $props.id() for title and SVG resource identifiers.

Svelte 5.20 or newer is required. Keep server and client package versions aligned for stable hydration.

Available Styles

| Import subpath | Style | Icons | |---|---|---:| | core-regular | Core Regular | 1,663 | | core-filled | Core Filled | 1,663 | | Total | All public styles | 3,326 |

Additional Core, Cute, and Sharp styles are available in Mingcute Pro.

Production Guidance

  • The package is ESM-only and side-effect free.
  • Prefer direct icon subpaths in shared libraries and bundle-sensitive entry points.
  • Keep framework and Mingcute package versions aligned across server and client environments where applicable.
  • Use framework components or standalone SVG when gradients, masks, patterns, or original colors must be preserved exactly.
  • Use bind:ref only when direct SVG access is required.

Integration with Definitions

@mingcute/icons owns icon names, normalized geometry, SVG resources, layers, and metadata.

@mingcute/svelte owns:

  • Svelte component rendering;
  • prop and attribute handling;
  • accessibility behavior;
  • resource ID scoping; and
  • framework-specific refs and lifecycle behavior.

This separation prevents duplicate icon data and keeps every framework adapter visually consistent.

Troubleshooting

A component import cannot be resolved

Use a PascalCase named export from a style entry point or the kebab-case direct icon path.

The production bundle is larger than expected

Use direct icon subpaths and confirm that the bundler tree-shakes ESM. Avoid namespace imports of complete style entry points.

$props.id() or rune errors appear

Upgrade the consuming application to Svelte 5.20 or newer.

An SSR hydration warning appears

Confirm identical server and client trees and Mingcute package versions.

Development

This package is generated from canonical SVG sources. Do not edit generated output by hand.

pnpm --filter @mingcute/svelte check

License

Licensed under the Apache License 2.0.

Links