Because everything is a block in Roam, our notes become extremely versatile. Not only can we link to pages, we can also link to blocks and even show their contents directly when linking to them.
Enter powerful block references.
What is a block reference?
Block references are like windows to other parts of your database. In Roam, blocks are floating around freely, not bound by any folders. To link together content, every block in Roam has an address—and this address lets us do lots of cool stuff.
Like we can reference a page by placing its name between [[double brackets]], we can reference a block by using ((double parenthesis)) and placing the block’s address in between. The main difference between a page reference (link) and a block reference is that block references show the contents of the block by default. You can recognize a block reference by the light underline:
How to reference blocks
There are four ways to reference blocks:
- Copying their address.
- Click-dragging them.
- Searching for them.
- In an alias
Let’s have a look at each separately.
Copy the block ref
The easiest way to reference a block is by having it in front of you. Simply
Right-Click on the bullet of the block you want to reference, and click
Copy block ref to copy its address (including double parentheses) to your clipboard:
You can also select multiple blocks and copy all of their addresses (again, including double parentheses) to your clipboard:
As you can see in the screenshot above, you can also use the shortcut
Ctrl-Shift-c (Windows) to copy the blocks’ addresses. This shortcut also works when you have a single block selected.
A second way to reference a block when it’s in front of you is by clicking and holding the bullet of any block (or selection of blocks) with your mouse. Then, holding the
Option key (macOS)/
Alt key (Windows), you’ll see a green icon with a + sign appears under your cursor. This means you’re referencing the block.
Now, drag the block (while still holding
Alt) to the position where you want to drop the reference:
If you also press and hold the
Shift key right before dropping the reference, you’ll bring along all its children as block references:
Search for the block
Searching for a block is possible in a two ways: using the top search bar or with inline search.
Using the search bar
Whenever you type something in the top search bar (shortcut:
Ctrl-u), Roam will search both for pages and blocks. You can recognize the blocks in the search results because they only show text; no title is visible.
Using inline search
Whenever you type
(( and text, you start searching your entire database. By typing words that are mentioned in the block you’re looking for, you refine your search. Hit
Enter when you’ve found the block to pull its address between the parentheses. Tada! You’ve just did the fastest block search possible in Roam.
Link to blocks using an alias
Finally, we can use good ol’ links to target a specific block. But, instead of using [[double brackets]], we need to use the alias/external link (see Lesson 2: Link your thinking for more info):
Between the single brackets you place the text we want to give the link. Between the single parentheses, you put the block address (including double parentheses). Now, by clicking the link you’re taken to the block (zoomed in view).
Use Roam to write something. But, instead of typing new words, try to assemble as much as possible with block references.
One popular way to pull block references is by opening a page or branch of blocks in the sidebar, and then drag-reference them into the main windows (holding the
Want to see block references in action? Check out this video by Dalton Mabery: