Obsidian Columns

by Trevor Nichols
5
4
3
2
1
Score: 59/100

Description

The Obsidian Columns plugin allows users to create multi-column layouts within Obsidian notes. It offers three distinct methods for structuring columns: callout syntax, codeblock syntax, and list syntax. The plugin supports advanced layout features, including nested columns, customizable column widths, and flexible row creation. Users can define the height, width, alignment, and borders of individual columns, as well as set global layout defaults for an entire column group. With live-preview support for callout and codeblock syntax, users can see their column structures in real time. The plugin also enables content wrapping for mobile devices, ensuring responsiveness. Customizable border styles, padding, and row breaks provide precise control over the visual presentation of notes. The Obsidian Columns plugin is useful for structuring complex notes, side-by-side content, or any layout requiring a multi-column approach.

Reviews

No reviews yet.

Stats

285
stars
82,677
downloads
13
forks
1,474
days
525
days
525
days
3
total PRs
1
open PRs
0
closed PRs
2
merged PRs
76
total issues
26
open issues
50
closed issues
11
commits

Latest Version

a year ago

Changelog

Fix plugin ID issues with the new plugin standards

README file from

Github

Obsidian Columns

Allows you to create columns in Obsidian
This plugin also works on mobile with a column wrapping feature (that you can enable in settings)
There are three main ways to utilize this plugin:

  • Callout Syntax (live-preview supported, less settings)
  • Codeblock Syntax (live-preview supported, all settings)
  • List Syntax (live-preview not supported, less settings)

Callout syntax

The obsidian-columns callout syntax utilizes the Obsidian Callout spec, defined here, which in turn utilizes the markdown blockquote spec defined here

The callout syntax uses no javascript at all, which makes it highly compatible with live preview without the use of codeblocks, this also means that the callout syntax cannot limit the height of the columns without significant performance trade-offs.

The col callout renders every item within the callout as its own column. The col-md callout can be nested within the col callout in order to group items into a column.

To use the col callout, create a callout with the col name:

> [!col]
> A col callout
>
> Second column of the callout

To use the col-md callout, create a col-md callout within the col callout

> [!col]
> A col callout
>
>> [!col-md]
>> The second column of the callout
>> 
>> More lines on the second column of the callout

The col-md callout's width can be adjusted by adding the width after the col-md name:

> [!col]
> A col callout
>
>> [!col-md-3]
>> The second column of the callout
>> 
>> This column is now 3 times the width of the first column

The width attribute of the col-md callout can only be multiples of 0.5 up to 10, like 1, 1.5, 6.5, etc. due to limitations of live preview and the CSS attr() function.

More columns can be nested within other columns simply by creating a new column within the callout. More examples can be seen below.

Codeblock syntax

The obsidian-columns codeblock syntax utilizes named codeblocks from the Obsidian markdown spec, seen here

Similar to the callout syntax, use a col named codeblock to initiate a column group. All items within the col codeblocks will be rendered as its own column. The col-md codeblock can be nested within the col codeblock to group multiple items together into a single column.

When using codeblock syntax, ensure parent codeblocks have more backticks (`) then their children codeblocks, for example:

````col
```col-md
Column A
```

```col-md
Column B
```
````

Codeblock Settings Block

Both the col and col-md codeblocks optionally have a settings header that is defined as everything above a === delimiter

  • col
    • height: CSS height or shortest
    • textAlign: CSS text-align (start, end, center)
  • col-md
    • height: CSS height
    • flexGrow: number
    • textAlign: CSS text-align (start, end, center)

For example, to set the flexGrow value in a col-md block:

```col-md
flexGrow=2
===
MD to be rendered
```

The col codeblock

height property

The height property of the col codeblock's setting block sets a limit on how tall the set of columns will be. Any extra text will be able to be viewed with a scrollbar.

The property can be set to any valid CSS value or the value of "shortest", which picks the length of the shortest column within the column group

For example:

````col
height=shortest
===
```col-md
line 1
line 2
line 3
line 4
```

```col-md
line 1
line 2
```
````
textAlign property

The textAlign property sets the default textAlign for the column set. This value can be overridden by the individual column's textAlign setting.

  • "start" or "left" would left-align the column
  • "end" or "right" would right-align the column
  • "center" would center the text in the column
  • "justify" justifies the column content
Rows

Use "===" within a col codeblock to denote a new row in the column

Usage of the row delimiter forces the existence of the settings block. If you would not like to change any settings, but use rows, place an "===" at the top of all your content to define an empty settings block

col-md

height property

The height property of the col-md codeblock's setting block sets a limit on how tall this individual column will be. Any extra text will be able to be viewed with a scrollbar.

The property can be set to any valid CSS value.

textAlign property

The textAlign property sets the textAlign for this column. This value overrides the column group's default value.

  • "start" or "left" would left-align the column
  • "end" or "right" would right-align the column
  • "center" would center the text in the column
  • "justify" justifies the column content
flexGrow property

The flexGrow property sets the width of a column with respect to the sizes of all the other columns. If a left and right column have a flexGrow of 1, whilst the middle column has a flexGrow of 2, then the center column will be twice as wide as the edge columns individually.

The property can be set to any valid positive number (0.4, 10, 23.62)

border properties

Border properties can be used to configure a border around both either a col or col-md column. These properties directly match to the available CSS properties as seen here. If any of the border properties are specified, a border will be created with default values for all non-specified properties. The available properties are:

  • borderColor: (Default: white) CSS color
  • borderStyle: (Default: solid) CSS border-style
  • borderWidth: (Default: 1px) CSS border-width. If no unit is specified, px is assumed
  • borderRadius: (Default: 0) CSS border-radius. If no unit is specified, px is assumed
  • borderPadding: (Default: 0) CSS padding. If no unit is specified, px is assumed

Examples

image

Produced by the MD below:

```````col
``````col-md
flexGrow=1
===
> [!info] Callouts
>  Stuff inside the callout
>  More stuff inside.
>> [!ERROR] Error description
>>  Nested callout
>>  `````col-md
>>  - example MD code
>>  - more stuff
>>  `````
``````

``````col-md
flexGrow=2.5
===
# Text annotation example:

`````col
````col-md
flexGrow=1
===
1. Function name **a** should be more descriptive

2. Remove **if/else** by using **||**
````

````col-md
flexGrow=2
===
```js
function a(word) {
	if (word != null) {
		console.log(word);
	} else {
		console.log("a");
	}
}
let msg = "Hello, world!";
console.log(msg)
```
````
`````
``````
```````

!!! Dont forget to use additional backticks when using recursive codeblocks! Ex: col has 4 ticks and col-md has 3

or using callout syntax:

> [!col]
>> [!info] Callouts
>> Stuff inside the callout
>> More stuff inside.
>>> [!ERROR] Error description
>>> Nested callout
>>> - example MD code
>>> - more stuff
>
>> [!col-md-2.5]
>> # Text annotation example:
>>> [!col]
>>>> [!col-md]
>>>> 1. Function name **a** should be more descriptive
>>>> 2. Remove **if/else** by using **||**
>>> 
>>>> [!col-md-2]
>>>> ```js
>>>> function a(word) {
>>>> 	if (word != null) {
>>>> 			console.log(word);
>>>> 	} else {
>>>> 		console.log("a");
>>>> 	}
>>>> }
>>>> let msg = "Hello, world!";
>>>> console.log(msg)

Border example

image

Produced by the MD below:

`````col
borderColor=purple
borderPadding=10
===

```col-md
borderColor=red
borderStyle=dashed
===
## Column 0
```
```col-md
borderPadding=5px
===
## Column 1
```

````col
borderColor=#d60da1
borderPadding=20
borderRadius=5em
===

```col-md
borderColor=teal
borderWidth=5px
===
### Nested Column 0
```
```col-md
borderColor=orange
===
### Nested Column 1
```
````

`````

List Structure

You can also create columns by creating a list in the structure shown (not supported in live preview):

  • !!!col
    • (flex-grow)
      • (Text in column 1)
    • (flex-grow)
      • (Text in column 2)

image

Produced by the MD code below:

- !!!col
	- 1
		# Column 1
		Some example text in column 1
		- some lists inside as well
			- more list items
	- 2
		# Column 2
		This column is twice as wide because it has the value set to 2
		- !!!col
			- 1
			  ## Column 2-1
			  You can even have columns inside columns!
			- 1
			  ## Column 2-2
			  More example text inside this column

Settings

Minimum Width of Column

This setting ensures that columns are a certain width. If not all the columns satisfy this width, extra columns will wrap to below (as rows). Technically, just sets the flex-basis attribute.

Default span

This setting sets the default span value for a column if it is not explicitly specified. For the time being, col codeblocks have each column set to this value and cannot be changed.

Upcoming features

  1. Enable syntax highlighting for editor.

If you enjoy my plugin, please consider supporting me:

ko-fi

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Advanced Codeblock
4 years ago by Lijyze
An obsidian plugin that give additional features to code blocks.
List Callouts
4 years ago by mgmeyers
Create callouts in lists in Obsidian.
Image Layouts
3 years ago by Luke Chadwick
Numerals
3 years ago by RyanC
An obsidian plugin which turns a math code block into a full featured calculator
ProgressBar
3 years ago by Wei Zhang
Code block plugin for Obsidian generating a progress bar
Callout Manager
3 years ago by eth-p
An Obsidian.md plugin that makes creating and configuring callouts easy.
Callout Integrator
3 years ago by
A plugin for Obsidian to allow the integration of long blocks of text into callouts.
Codeblock Customizer
3 years ago by mugiwara
Codeblock Customizer plugin for Obsidian
HK Code Block
3 years ago by Heekang Park
Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
CodeBlock Tabs
3 years ago by Jemin Mau
Create tab group for contiguous codeblocks.
MLIR Syntax Highlight
3 years ago by Lewuathe
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
Todo.txt Codeblocks
3 years ago by Benjamin Nguyen
Manage your tasks inside Obsidian codeblocks according to the Todo.txt specification.
CSV Codeblock
3 years ago by elrindir
Plugin for obsidian to render csv syntax in codeblocks.
Blockier
2 years ago by blorbb
An Obsidian.md plugin for easier block editing.
Minitabs
2 years ago by ssjy1919
Obsidian tabs
Note Gallery
2 years ago by Pash Shocky
A masonry note gallery for obsidian.
Better Math in Callouts & Blockquotes
2 years ago by Ryota Ushio
An Obsidian plugin to add better Live Preview support for math rendering inside callouts & blockquotes.
Inline Admonitions
2 years ago by Scott Tomaszewski
Callout Suggestions
2 years ago by Casey Fryer
Obsidian Plugin for autocompleting callouts.
heti
2 years ago by Moeyua
Templify
2 years ago by Boninall
A releases repo for custom editable template in Obsidian.
Vertical Tabs
2 years ago by oxdc
An Obsidian plugin that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.
ABC Music Notation
5 years ago by Til Blechschmidt
Plugin which renders music notations from code blocks
Admonition
5 years ago by Jeremy Valentine
Adds admonition block-styled content to Obsidian.md
Embedded Code Title
5 years ago by tadashi-aikawa
It is an Obsidian plugin which can embeds title to code blocks.
Callout menu
2 years ago by Anareaty
Callout Toggles
2 years ago by Aly Thobani
An Obsidian plugin to quickly add, change, or remove callout wrappers in your notes.
CalloutX
a year ago by br4in
An Obsidian plugin that allows you to view, manage, and customise callout icons in your vault.
Callout Copy Buttons
a year ago by Aly Thobani
An Obsidian plugin that adds copy buttons to callout blocks in your notes.
Tab Group Arrangement
a year ago by situ2001
Arrange the tab groups of Obsidian in a more flexible way
Collapsible Code Blocks
a year ago by Bradley Wyatt
Obsidian Plugin that makes code blocks collapsible in reading and edit view as well as enabling scroll-able code blocks.
Command Line
a year ago by Steven Stallion
Copy command lines from your notes to the clipboard.
Comments
a year ago by Jasper Surmont
YAML Table
a year ago by dainakai
Replace Pencil
10 months ago by penyt
🐧 An obsidian plugin that can easily replace the custom variable in the code block.
Simple Columns
10 months ago by Josie
An Obsidian plugin that lets you create easily resizable and customizable columns in your notes.
Citation Callouts
9 months ago by Michael Marvive
Obsidian Plugin that formats a quote with a citation in a custom callout
Code Blocks commands
8 months ago by dragonish
Provide commands to insert code blocks with markup, and support triggering commands with backticks.
Horizontal Blocks
7 months ago by iCodeAlchemy
Bring Notion-style layouts to Obsidian — with side-by-side, resizable markdown blocks that support full Obsidian syntax including images, embeds, and internal links.
Kanban Bases View
2 months ago by I. Welch Canavan
A kanban-style drag-and-drop custom view for Bases.