@mingcute/solid
v3.1.0
Published
Mingcute SVG icon components for SolidJS.
Readme
Overview
@mingcute/solid provides typed SolidJS components for the public MingCute Core Regular and Core Filled styles.
Canonical icon geometry comes from @mingcute/icons. The adapter focuses on SolidJS rendering, accessibility, prop precedence, refs, framework lifecycle behavior, and stable SVG resource identifiers.
Highlights
- 4,526 styled definitions: 2,263 icons in Core Regular and Core Filled.
- Typed SolidJS 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: SolidJS 1.9.x.
# npm
npm install @mingcute/solid
# pnpm
pnpm add @mingcute/solid
# Yarn
yarn add @mingcute/solid
# Bun
bun add @mingcute/solidQuick Start
import { Home1Regular } from '@mingcute/solid/core-regular';
export function NavigationIcon() {
return <Home1Regular size={24} title="Home" />;
}Imports
Style entry points
import {
Home1Regular,
Search2Regular,
} from '@mingcute/solid/core-regular';Direct icon imports
import Home1Regular from '@mingcute/solid/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 | Solid SVG value | size | Overrides the rendered width |
| height | Solid 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 | Solid SVG values | none | Styles the rendered SVG |
| Other props | Solid SVG attributes | none | Forwards SVG, event, ref, 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
Resource identifiers use Solid instance IDs.
Keep server and client component trees and package versions aligned so generated IDs hydrate consistently.
Available Styles
| Import subpath | Style | Icons |
|---|---|---:|
| core-regular | Core Regular | 2,263 |
| core-filled | Core Filled | 2,263 |
| Total | All public styles | 4,526 |
Additional Core, Cute, and Sharp styles are available in MingCute Pro.
Free and Pro
| Capability | MingCute Icons | MingCute Pro |
| ------------------- | ---------------------------- | -------------------------------------------- |
| Families and styles | Core Regular and Core Filled | 12 Core, Cute, and Sharp style combinations |
| Styled definitions | 4,526 | 27,360 |
| Package names | @mingcute/* | @mingcute/*-pro |
| Distribution | Public npm registry | Private MingCute registry |
| Access | No account or CLI required | Active Pro entitlement and CLI configuration |
| License | Apache-2.0 | MingCute Pro Commercial License |
The public and Pro packages use the same framework conventions and import structure. This makes migration straightforward while keeping the source repositories and licensing boundaries separate.
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.
- The supported peer range intentionally excludes unstable Solid 2 prereleases.
Integration with Definitions
@mingcute/icons owns icon names, normalized geometry, SVG resources, layers, and metadata.
@mingcute/solid owns:
- SolidJS 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.
A peer dependency warning appears
Use a supported SolidJS 1.9 release. Solid 2 prereleases are intentionally excluded.
An SSR hydration warning appears
Confirm identical server and client component trees and package versions.
Development
This package is generated from canonical SVG sources. Do not edit generated output by hand.
pnpm --filter @mingcute/solid checkLicense
Licensed under the Apache License 2.0.
