Mainstream Icons

approved

by kotaindah55

Inject additional mainstream icons from Lucide and Lucide Lab. - This plugin has not been manually reviewed by Obsidian staff.

15 downloadsUpdated 1d agoMIT

Mainstream Icons - Obsdian Plugin

latest-version current-downloads current-stars open-issues

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 (lucide-list-clock) and user-group (lucide-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 disabledPlugin enabled
plugin-disabled.pngplugin-enabled.png

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

  1. Open settings.
  2. Choose "Community plugins" setting tab.
  3. Turn off "Restricted mode" if it was enabled before.
  4. Click "Browse" at "Community plugins" item.
  5. Type "Mainstream Icons" in the search box.
  6. Install and enable it.

Manual installation

  1. Create a folder named mainstream-icons under YOUR_VAULT_NAME/.obsidian/plugins.
  2. Place manifest.json, main.js, and style.css from the latest release into the folder.
  3. 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.