Mainstream Icons
approvedby kotaindah55
Inject additional mainstream icons from Lucide and Lucide Lab. - This plugin has not been manually reviewed by Obsidian staff.
Mainstream Icons - Obsdian Plugin
Inject additional mainstream icons from Lucide and Lucide Lab to Obsidian.
Overview
Obsidian already ships most of Lucide icons to its app. Although, It's still missing latest mainstream icons from Lucide such as list-clock () and
user-group () icons. That's why Mainstream Icons was created to address that lack of things by injecting latest mainstream icons to the core of the Obsidian app.
[!NOTE]
Please note that this plugin is not intended to customize icons on its own. Rather, it merely provides additional icons for use by Obsidian and other plugins.
Example using Note Toolbar plugin:
| Plugin disabled | Plugin enabled |
|---|---|
Notes for developers
To insert additional icon, you can use the same method as inserting icon using getIcon() or setIcon():
import { getIcon, setIcon } from 'obsidian';
// Get icon svg and insert it
let iconEl = createDiv();
let iconSvg = getIcon('lucide-user-group');
if (iconSvg) iconEl.append(iconSvg);
// Or, insert it immediately
let anotherIconEl = createDiv();
setIcon(anotherIconEl, 'lucide-user-group');
But, why don't we use addIcon() to extend existing icons? Indeed, Obsidian already provides us that function as a solution to use external icons as we want. Although, Obsidian will automatically set the view box of the SVG element to 0 0 100 100 (i.e. wrapped in just <svg viewBox="0 0 100 100">...</svg>), while Obsidian treats internal icons differently (by wrapping them in <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor">...</svg>).
It's not a really big deal though. However, especially for me who want to achieve consistency, it can be a little frustating sometimes.
Installation
In-app installation
- Open settings.
- Choose "Community plugins" setting tab.
- Turn off "Restricted mode" if it was enabled before.
- Click "Browse" at "Community plugins" item.
- Type "Mainstream Icons" in the search box.
- Install and enable it.
Manual installation
- Create a folder named
mainstream-iconsunderYOUR_VAULT_NAME/.obsidian/plugins. - Place
manifest.json,main.js, andstyle.cssfrom the latest release into the folder. - Enable it through the "Community plugin" setting tab.
Using BRAT
Attribution
Lucide is a trademark of Lucide Icons, which is licensed under MIT. This plugin is not affiliated with or endorsed by Lucide Icons.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.