Toggle Full Width

unlisted

by Martín M.

Toggle any note between readable line length and full width with one click.

Updated 17d agoMIT
View on GitHub

Toggle Full Width

An Obsidian plugin that lets you toggle any note between readable line length and full viewport width with a single click.

Usage

  1. Enable "Readable line length" in Obsidian Settings → Editor
  2. Open any note
  3. Toggle full width using one of:
    • Command palette: Search for "Toggle full width"
    • Status bar: Click the width indicator in the bottom-right corner
    • Hotkey: Assign a custom hotkey in Settings → Hotkeys

Toggling adds or removes full-width in the note's cssclasses frontmatter property. This means:

  • The setting persists across sessions
  • It works even if you disable the plugin (as long as you keep the CSS)
  • You can also add full-width manually to any note's frontmatter

Configuration

Open Settings → Community plugins → Toggle Full Width to choose the Width used when full width is enabled: 100%, 90%, or 80%. This is the global default applied to every note carrying the plain full-width class.

Per-note width

To give a single note its own width regardless of the global setting, add one of these preset classes to its cssclasses frontmatter by hand:

---
cssclasses:
  - full-width-90
---
ClassWidth
full-widthGlobal setting
full-width-100100%
full-width-9090%
full-width-8080%

When a preset class is present, the status bar shows that note's actual width (e.g. ↔ 90%).

How it works

The plugin ships CSS rules that set --file-line-width on notes carrying a full-width class. The plain full-width class uses the width from the plugin settings; the full-width-100 / full-width-90 / full-width-80 classes use their fixed values. Toggling adds or removes the full-width class from the note's frontmatter.

Requirements

  • Obsidian v1.4.0 or later
  • "Readable line length" must be enabled (Settings → Editor)

Installation

This plugin is not yet in the Obsidian community plugin store.

Via BRAT (recommended)

  1. Install the BRAT community plugin
  2. In BRAT, choose "Add Beta plugin" and enter skydiver/obsidian-toggle-full-width
  3. Enable "Toggle Full Width" in Settings → Community plugins

Manual

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder .obsidian/plugins/toggle-full-width/ in your vault
  3. Copy the three files into that folder
  4. Enable the plugin in Settings → Community plugins

Development

pnpm install
pnpm run dev      # watch mode
pnpm run build    # production build
pnpm run lint     # check with biome
pnpm run lint:fix # auto-fix

To test locally, symlink the project folder into your vault:

ln -s /path/to/obsidian-toggle-full-width /path/to/vault/.obsidian/plugins/toggle-full-width

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.