@mal-icons/astro
v0.7.11
Published
Astro components for mal-icons.
Maintainers
Readme
@mal-icons/astro
Astro adapter for mal-icons — a
high-performance icon SDK. Each icon is a pre-generated .astro component that
renders to static SVG at build time and ships zero JavaScript.
Highlights
- Zero runtime — icons render at build time; nothing is shipped to the client.
- Per-component props — there is no runtime context, so theming is configured via props.
- Accessible — correct
role/aria-hiddenand optional<title>.
Installation
bun add @mal-icons/astro
# or
npm install @mal-icons/astroRequires Astro 4 or newer (peer dependency).
Use with AI agents
AI coding agents can add and theme these icons for you via the
mal-icons agent skill. Install it with the
skills CLI:
npx skills add mal-icons/mal-iconsThen ask your agent to "add a trash icon" and it searches the catalog and writes
the correct @mal-icons/astro import. See the
Astro setup guide.
Quick start
Import the .astro icon component directly and use it in your markup:
---
import FiActivity from "@mal-icons/astro/fi/FiActivity.astro";
---
<FiActivity size={24} title="Status" />Because Astro components render at build time and have no runtime context, theming is configured per component via props rather than a shared provider.
Props
| Prop | Type | Description |
| ------- | ------------------ | ------------------------------------ |
| size | number \| string | Width and height (defaults to 1em) |
| color | string | Overrides currentColor |
| multicolor | boolean | Keep the icon's own colors (omits the currentColor stroke/fill defaults) |
| title | string | Accessible label |
| class | string | Additional class names |
Icons
The bundled icon sets, their upstream licenses, pinned versions, and counts:
| Icon Library | License | Version | Count | | ---------------------------------------- | --------------------------------------------------------------------------------- | ------- | ----: | | Ant Design Icons | MIT license | 4.0.0 | 420 | | Circum Icons | MPL-2.0 license | 2.0.2 | 288 | | Codicons | CC BY 4.0 license | 0.0.46 | 604 | | css.gg | MIT license | 2.1.1 | 704 | | Devicons | MIT license | 2.0.1 | 1725 | | Feather | MIT license | 4.29.0 | 287 | | Flat Color Icons | CC BY 4.0 license | 1.0.2 | 312 | | Font Awesome Free | CC BY 4.0 license | 6.7.2 | 1402 | | Grommet | Apache 2.0 license | 4.14.0 | 637 | | Heroicons | MIT license | 2.2.0 | 324 | | Ionicons | MIT license | 8.0.13 | 1357 | | Lucide | ISC license | 1.19.0 | 1727 | | Octicons | MIT license | 19.28.1 | 733 | | Radix Icons | MIT license | 0.0.17 | 318 | | Simple Line Icons | MIT license | 2.5.5 | 189 | | Themify | SIL OFL 1.1 license | 9600186 | 352 | | Typicons | CC BY-SA 4.0 license | 2.1.2 | 336 | | Weather Icons | SIL OFL 1.1 license | 2.0.12 | 219 |
Subpath exports
| Import | Contents |
| -------------------------------------- | ------------------------------ |
| @mal-icons/astro/ad/AdHome.astro | A single Ant Design icon component |
| @mal-icons/astro/ci/CiHeart.astro | A single Circum icon component |
| @mal-icons/astro/dev/DevDreamhost.astro | A single Devicons icon component |
| @mal-icons/astro/fa/FaHeart.astro | A single icon component |
| @mal-icons/astro/fi/FiActivity.astro | A single icon component |
| @mal-icons/astro/gr/GrHome.astro | A single icon component |
| @mal-icons/astro/fc/FcAbout.astro | A single Flat Color icon component |
| @mal-icons/astro/io/IoHeart.astro | A single Ionicons component |
| @mal-icons/astro/lu/LuHeart.astro | A single Lucide component |
| @mal-icons/astro/oc/OcHeart16.astro | A single Octicons component |
| @mal-icons/astro/ti/TiHeart.astro | A single Typicons component |
| @mal-icons/astro/wi/WiDaySunny.astro | A single Weather Icons component |
| @mal-icons/astro/IconBase.astro | The shared base component |
| @mal-icons/astro/hi | All Heroicons icons (named exports) |
| @mal-icons/astro/hi/HiAcademicCap.astro | A single Heroicons icon module |
| @mal-icons/astro/sl | All Simple Line Icons icons (named exports) |
| @mal-icons/astro/sl/SlActionRedo.astro | A single Simple Line Icons icon module |
| @mal-icons/astro/cg | All css.gg icons (named exports) |
| @mal-icons/astro/cg/CgAbstract.astro | A single css.gg icon module |
| @mal-icons/astro/vsc | All Codicons icons (named exports) |
| @mal-icons/astro/vsc/VscAccount.astro | A single Codicons icon module |
| @mal-icons/astro/tf | All Themify icons (named exports) |
| @mal-icons/astro/tf/TfAgenda.astro | A single Themify icon module |
| @mal-icons/astro/rx | All Radix Icons icons (named exports) |
| @mal-icons/astro/rx/RxAccessibility.astro | A single Radix Icons icon module |
Example
A static, zero-JS Astro site rendering the shared gallery lives in
examples/astro.
Repository
https://github.com/mal-icons/mal-icons · package directory
packages/astro.
License
MIT © MALDevs
