Custom icons for spoilers

Use case or problem

The current spoiler syntax in Obsidian (e.g., >!spoiler text!<) is great for hiding content, but the default icons feel limiting in terms of visual customization and thematic alignment. In visually dense or themed vaults, especially those with custom CSS or community themes, the inability to replace the spoiler icon with a custom icon (e.g., an .ico, SVG, or even emoji) can break immersion or consistency in design. For users building knowledge gardens, wikis, or RPG campaign notes, having thematic control over these icons could really enhance the UX.

Proposed solution

Introduce an option, either via the core app or through an exposed CSS variable, to set a custom icon for spoiler toggles. Ideally, users could:

  • Specify a path to a local .ico, .svg, or image file to be used as the icon.

  • Use a plugin API hook for programmatic control (for plugin developers).

  • Or have a native setting in the appearance tab to select/replace spoiler icons with custom imagery.

Current workaround (optional)

Related feature requests (optional)

There’s no “spoiler text” syntax in Obsidian. Are you using a plugin, HTML, un-styled callout like

> [!spoiler]- Title
> Contents

or similar?


For custom callouts, you can write your own CSS snippet or use a plugin like GitHub - eth-p/obsidian-callout-manager: An Obsidian.md plugin that makes creating and configuring callouts easy.

e.g.

1 Like