Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Section Variants

Gabriel BachaGabriel Bacha299 downloads

Switch, compare, and manage parallel versions of Markdown sections within one note.

Add to Obsidian
Section Variants screenshot
Section Variants screenshot
  • Overview
  • Scorecard
  • Updates6

Section Variants lets you switch, compare, and manage parallel versions of a Markdown section without splitting them across notes.

Created by Gabriel Bacha

Visit gabrielbacha.com  ·  Explore more Obsidian plugins  ·  Request a feature

Screenshots

Compare variants side by side

Section Variants showing Customer, Executive, and Technical content side by side in Columns view

Switch audiences and control each block

Section Variants showing audience variants and contextual block controls

Syntax

Use a Pandoc fenced div containing two or more labeled variant divs:

:::: {.variants #introduction name="Introduction options" view="columns" default="Short"}

::: Short
A concise introduction.
:::

::: {.variant label="Long version"}
A longer introduction with more context.
:::

::::

Safe single-token labels use shorthand. Labels containing spaces or punctuation use the explicit .variant form. Supported block attributes are:

  • #id
  • name="Box title"
  • view="toggle|columns"
  • default="Label"
  • widths="2fr 1fr" (generated from column ratios)
  • responsive="responsive|stack|scroll"

The canonical container is variants. Additional aliases can be enabled in Settings → Section Variants.

Using variants

  • Hover or focus a bordered block to reveal its labels, an Add variant shortcut, and Toggle/Columns controls.
  • Shift-select a label to apply it to every matching block in the note.
  • Open the small layers marker for Add variant, Rename variant, and Delete variant, followed by box and state settings. Rename/Delete submenus open while hovering or focusing and stay attached to their parent item. Delete box removes the complete container, all variants, and its attached stable block ID. Every deletion requires confirmation; a box may temporarily contain one variant, but the final variant cannot be deleted independently.
  • Hide individual columns temporarily and explicitly save visibility when wanted.
  • Use the copy action in any variant header to copy that variant's exact Markdown content without its outer fences.
  • Use the bottom-right note control to apply labels, views, or narrow-screen layout across a note. Its narrow-layout button sits beside the globe at every view state and opens Wrap into rows, Stack vertically, or Scroll horizontally; boxes following global state use that layout whenever they display Columns. Its label buttons show or hide that column across every matching box, and the eye toggle hides every column or restores all of them at once. The control measures the current Obsidian status bar and stays above it, including in pop-out windows.
  • The note-wide controller's persistent layers marker has an accent-colored border so it remains distinct from individual actions. Turning the globe off restores local block state without clearing or visually deselecting the saved global label, view, and narrow-layout choices.
  • Every note-wide action affects only boxes following global state. Opted-out boxes retain their local variant, view, layout, column visibility, and active editor even while the toolbar displays remembered global choices.
  • The layers marker menu contains only Hide note control. Restore a hidden control from the command palette with Section Variants: Show note control.
  • In Live Preview, Toggle content and every visible Columns panel are directly editable with Obsidian's normal Live Preview formatting. In Columns view, the A/B label controls show or hide their matching columns. Links, checkboxes, embeds, buttons, and nested controls keep their normal behavior.
  • Source Mode always displays the complete Markdown source.

Open the command palette for insertion, cycling, note-wide actions, resets, sticky-control visibility, focused-block ID and column-visibility actions, and HTML export. No default hotkeys are assigned.

Creating blocks

Three insertion paths open the same configuration dialog:

  • Run Section Variants: Insert variants block.
  • Type /variants.
  • Type ::: variants.

Typing a variant opener inside an existing block also suggests labels already used in the note.

Variant fields in both Insert variants block and Add variant autocomplete labels from valid blocks in the current note. Suggestions preserve authored casing, rank frequent labels first, and exclude labels already used in the box being edited.

Legacy notes containing view="auto" remain valid and use responsive Columns. Auto is no longer offered for new blocks because Columns already wraps according to the available width.

The block context menu owns box configuration directly: Box name contains an inline text field, while Authored default, Authored view, and Narrow-screen layout use checked attached submenus that stay open while choices are applied. Each structural choice updates the open view immediately. Edit column relative widths is the only box-configuration dialog and presents one positive ratio per current variant; equal values split the box evenly. Wrap is the default narrow-screen layout. Legacy CSS widths and min-width attributes remain readable but are no longer exposed in the UI.

State and safety

Authored defaults remain in Markdown. Current selections, view choices, sticky-control state, and explicitly saved column visibility live in plugin data. Ordinary switching never rewrites the note.

Block-specific label, view, and authored narrow-layout choices are stored separately from note-wide global state. Follow global state is a checkbox toggle: while enabled, compatible global values are displayed without erasing the saved block-specific values; disabling it restores exactly those earlier local values. The note-wide globe toggles every valid block between following global state and its saved block-specific state. A blue marker dot means the block is following global state. Authored differences instead appear as a Modified badge beside Reset to authored defaults in the context menu. Stable-ID creation and label renames migrate these states to the new identity.

Inactive variants are hidden in Live Preview. Each valid block is one stable framed widget, so its toolbar and complete border remain attached while its Live Preview-formatted content updates. Menu-driven structural changes use the open note's editor transaction, appearing immediately and participating in normal undo/redo; closed notes use an atomic vault update. Live Preview retains Obsidian's native selection and editing behavior: whole-note and cross-block selections can delete, cut, paste over, or replace complete variants blocks. Switch to Source mode when you want to inspect or edit individual fences directly.

Blocks use an explicit Pandoc ID, a following Obsidian block ID, or a structural fingerprint for persistence. If duplicate fingerprints become ambiguous, use Add stable block ID or enable automatic IDs.

Malformed blocks remain fully visible. The warning explains the exact problem, and automatic fixing is offered only for an unambiguous missing final fence.

Reading View maps fences only within Obsidian's reported source section and requires an exact ordered match. Sections rendered later through virtualization and blocks split across render chunks are aggregated safely; incomplete or ambiguous mappings remain visible with a warning. Pop-out windows use their own document for mounts and ranges.

Export

  • Obsidian PDF export uses authored defaults through print styles.
  • Export variants to HTML offers authored-default or current-state output and writes a new .html file inside the vault.
  • HTML export keeps internal links and attachments as references; it does not bundle linked files.
  • Raw Markdown always retains every variant.

Development

Requirements: Node.js 18 or newer and npm.

npm install
npm test
npm run build
npm run lint

npm run check runs all release gates. The production release consists of main.js, manifest.json, and styles.css.

License

Section Variants is licensed under the Zero-Clause BSD license.


Created by Gabriel Bacha

Visit gabrielbacha.com  ·  Explore more Obsidian plugins  ·  Request a feature

HealthExcellent
ReviewSatisfactory
About
Manage parallel versions of a Markdown section inline, switching and comparing labeled variants without splitting content across notes. Create, rename, copy, hide or delete variants; toggle columns or stacked views, apply labels across a note, and copy a variant's raw Markdown for reuse.
MarkdownEditingAppearance
Details
Current version
1.0.5
Last updated
Last week
Created
2 months ago
Updates
6 releases
Downloads
299
Compatible with
Obsidian 1.12.0+
Platforms
Desktop, Mobile
License
0BSD
Report bugRequest featureReport plugin
Author
Gabriel BachaGabriel Bachagabrielbacha
www.gabrielbacha.com/ob
GitHubgabrielbacha
bacha.xyz
  1. Community
  2. Plugins
  3. Markdown
  4. Section Variants

Related plugins

Outliner

Work with your lists like in Workflowy or Roam Research.

Various Complements

Complete words similar to auto-completion in an IDE.

Chat View

Chat View lets you quickly and easily create elegant Chat UIs in your Markdown Files.

Heading Shifter

Easily Shift and Change Markdown headings.

Lapel

Show the heading levels in the gutter of the editor.

Ninja Cursor

Enhance cursor visibility.

Shortcuts extender

Use shortcuts for input special symbols without language switching.

Chord Sheets

Work with chord sheets (chords over lyrics or inline) in Live Preview and reading mode: Chord diagrams for guitar, ukulele, mandolin and piano, transpose, autoscroll, and more.

Show Whitespace

CSS styles and CM6 extensions to highlight whitespace in Source and Live Preview modes.

Minimal Theme Settings

Control the colors and fonts in Minimal Theme.