Skip to content

Installation

    • Astro 4+ and Starlight 0.35+
    • UnoCSS

  1. Terminal window
    npm i starlight-plugin-icons
  2. Icons() wraps the Starlight plugin, so replace your existing starlight() integration with it:

    astro.config.mjs
    import { defineConfig } from 'astro/config'
    import UnoCSS from 'unocss/astro'
    import starlight from '@astrojs/starlight'
    import Icons from 'starlight-plugin-icons'
    export default defineConfig({
    integrations: [
    UnoCSS(),
    starlight({
    title: 'My dull docs site',
    }),
    Icons({
    starlight: {
    title: 'My dull docs site',
    },
    }),
    ],
    })
  3. uno.config.ts
    import { defineConfig } from 'unocss'
    import { presetStarlightIcons } from 'starlight-plugin-icons/uno'
    export default defineConfig({
    presets: [presetStarlightIcons()],
    })
  4. See the specific guides for each feature:

    Or use components exported by starlight-plugin-icons: