Skip to content

feat(icons): add more iconsets based on UnoCSS#22668

Merged
J-Sek merged 1 commit intomasterfrom
feat/unocss-iconsets
Mar 2, 2026
Merged

feat(icons): add more iconsets based on UnoCSS#22668
J-Sek merged 1 commit intomasterfrom
feat/unocss-iconsets

Conversation

@J-Sek
Copy link
Copy Markdown
Contributor

@J-Sek J-Sek commented Mar 1, 2026

  • aliases for UnoCSS-based icon sets for 7 additional libraries
    • Phosphor
    • Lucide
    • Tabler
    • Font Awesome 6
    • Carbon
    • BoxIcons
    • Remix Icon

Note: some aliases needed fallbacks to MDI-SVG

PR verification

Instructions to run the last snippet as dev/Playground.vue

  1. install dependencies
cd packages/vuetify
pnpm i -D unocss \
  @iconify-json/bx \
  @iconify-json/carbon \
  @iconify-json/fa6-solid \
  @iconify-json/fa6-regular \
  @iconify-json/lucide \
  @iconify-json/mdi \
  @iconify-json/ph \
  @iconify-json/ri \
  @iconify-json/tabler
  1. add UnoCSS for dev Playground setup
// in dev/vuetify.js
import 'virtual:uno.css'
  1. add uno.config.ts
import { defineConfig } from 'unocss'
import presetIcons from '@unocss/preset-icons'

export default defineConfig({
  presets: [presetIcons()],
})
  1. add line in vite.config.ts
import UnoCSS from 'unocss/vite'

dev/Playground.vue — icon set comparison table
<template>
  <v-app theme="dark">
    <v-main>
      <v-container max-width="900">
        <v-table density="compact" height="calc(100vh - 32px)" fixed-header>
          <thead>
            <tr>
              <th class="text-left">Alias</th>
              <th v-for="set in iconSets" :key="set.name" class="text-center">{{ set.name }}</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="alias in allAliases" :key="alias">
              <td><code>${{ alias }}</code></td>
              <td v-for="set in iconSets" :key="set.name" class="text-center">
                <v-tooltip v-if="set.aliases[alias]" location="bottom">
                  <template #activator="{ props }">
                    <v-icon v-bind="props" :icon="set.aliases[alias]" />
                  </template>
                  <code>${{ set.aliases[alias] }}</code>
                </v-tooltip>
                <span v-else class="text-disabled">—</span>
              </td>
            </tr>
          </tbody>
        </v-table>
      </v-container>
    </v-main>
  </v-app>
</template>

<script setup>
  import { computed } from 'vue'
  import { aliases as mdiAliases } from '@/iconsets/mdi-svg'
  import { aliases as mdiUnoAliases } from '@/iconsets/mdi-unocss'
  import { aliases as phAliases } from '@/iconsets/ph'
  import { aliases as tablerAliases } from '@/iconsets/tabler'
  import { aliases as lucideAliases } from '@/iconsets/lucide'
  import { aliases as fa6Aliases } from '@/iconsets/fa6'
  import { aliases as carbonAliases } from '@/iconsets/carbon'
  import { aliases as bxAliases } from '@/iconsets/bx'
  import { aliases as riAliases } from '@/iconsets/ri'

  const iconSets = [
    { name: 'MDI (SVG)', aliases: mdiAliases },
    { name: 'MDI (UnoCSS)', aliases: mdiUnoAliases },
    { name: 'Phosphor', aliases: phAliases },
    { name: 'Tabler', aliases: tablerAliases },
    { name: 'Lucide', aliases: lucideAliases },
    { name: 'Font Awesome 6', aliases: fa6Aliases },
    { name: 'Carbon', aliases: carbonAliases },
    { name: 'Box Icons', aliases: bxAliases },
    { name: 'Remix Icons', aliases: riAliases },
  ]

  const allAliases = computed(() => {
    const keys = new Set()
    for (const set of iconSets) {
      for (const key of Object.keys(set.aliases)) {
        keys.add(key)
      }
    }
    return [...keys]
  })
</script>

<style>
.v-icon[class*='i-fa6-'] {
  width: 0.8em;
  height: 0.8em;
}

.v-table thead th:not(:first-child) {
  writing-mode: sideways-lr;
  height: 200px;
}
</style>

@J-Sek J-Sek self-assigned this Mar 1, 2026
@J-Sek J-Sek added T: feature A new feature E: icons Icons composable labels Mar 1, 2026
@J-Sek J-Sek merged commit 6c8bea5 into master Mar 2, 2026
17 checks passed
@J-Sek J-Sek deleted the feat/unocss-iconsets branch March 2, 2026 16:29
mattgilbertnet pushed a commit to mattgilbertnet/vuetify that referenced this pull request Mar 2, 2026
@KaelWD KaelWD added this to the v4.0.x milestone Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

E: icons Icons composable T: feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants