General usage
Vueless supports the dynamic import of SVG icons, so you don’t need to explicitly import them. Simply set the icon name in the component, and you’ll get perfectly optimized SVG icons in your project.
Vueless comes with built-in support for three popular SVG icon libraries:
1. Install the desired icon library package.
# weight from 100 to 700 is available
npm install @material-symbols/svg-500
# or
npm install bootstrap-icons
# or
npm install heroicons
2. Define the icon library inside the defaults
key of the UIcon
component configuration.
export default {
component: {
UIcon: {
defaults: {
library: "@material-symbols/svg-500",
style: "outlined", // sharp | rounded | outlined
}
}
}
};
3. Use the SVG icon anywhere in the project.
<!-- Outlined version -->
<UIcon name="settings" />
<!-- Solid / Filled version -->
<UIcon name="settings-fill" />
Last updated