Icon
About 231 wordsLess than 1 minute
2025-10-08
Overview
The <Icon />
component loads icons from different icon libraries based on the markdown.icon
configuration.
The theme also provides markdown syntax support. Click to learn more
Configuration
.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
markdown: {
icon: { provider: 'iconify' } // Enabled by default
}
})
})
interface IconOptions {
/**
* Icon provider
*/
provider: 'iconify' | 'iconfont' | 'fontawesome'
/**
* Default icon prefix. Different providers have different default prefixes
* - iconify - Default: `''`
* - iconfont - Default: `iconfont icon-`
* - fontawesome - Default: `fas`
*/
prefix?: string
/**
* Icon asset links
*/
assets?: IconAssetLink | IconAssetLink[]
size?: string | number
color?: string
}
Props
nameOptionalstring
Icon name. When markdown.icon.prefix
has a value, the prefix in name
can be omitted.
colorOptionalstring
'currentcolor'
Icon color.
sizeOptionalstring
'1em'
Icon size.
Examples
Input:
- home - <Icon name="material-symbols:home" color="currentColor" size="1em" />
- vscode - <Icon name="skill-icons:vscode-dark" size="2em" />
- twitter - <Icon name="skill-icons:twitter" size="2em" />
Output:
- home -
- vscode -
- twitter -
Contributors
Changelog
10/9/25, 7:46 AM
View All Changelog