Components

Intro

The Figma design app has a brilliant feature called components which allows you to create reusable elements. This is an instance of modular design.

It works like this:

  • You can convert any element into a master component.
  • All master components are displayed in one place, and can be used to generate instances.
  • Modifying a master component modifies all instances of that component.
  • You can create components within components.

Something similar would work beautifully for Obsidian as well.


Possible implementation

We might call the smallest possible component, the atomic component. In Obsidian, the atomic component is the block. So the basic structure is already in place. All that remains is for the system to be better fleshed out.

One way to do that is having an option to directly convert a block into a component by generating a reference code next to it (eg ^67ce68). Normally, the code is generated only by referencing a block.

Components could be searchable as a category with a special search modifier – which would allow one to add them in the current page directly from the search results. This would also make them randomizable.

The next stage would be the possibility to create components within components.

Let’s say I have three blocks, A, B^ and C^, where B^ and C^ are components.

~
A
B^
C^
^^

Everything between the β€˜~’ and the β€˜^^’ symbols would be considered a complex component.

^###### - simple component
^^###### - complex component

1 Like