Hey guys, welcome to my blog :)
The style() is a new addition that came with Notion's Formula 2.0 update. You can access it if you're using Notion version 3.0. In this blog, we will explore the Notion formula style(). This formula is a versatile tool that adds styles and colors to your text, providing you with complete control over how your text appears.
Summary
Name | Description | How it works | Example |
style | Adds styles and colors to the text in the database
Valid formatting styles: "b" (bold), "u" (underline), "i" (italics), "c" (code), or "s" (strikethrough).
Valid colors: "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", and "red".
Add "_background" to colors to set background colors. | style(value, style_1, style_2, …., style_n)
| style("Notion", "b", "u")
= "Notion"
style("Notion", "blue")
= "Notion" |
style() Formula
The style() adds styles and colors to the text in the database
How style() works
Here's how you would write the if statement in Notion:
style(value, style_1, style_2, …., style_n)
The style formula accepts several parameters: 'value', which represents the text you want to format. You can directly input the text into the formula field, like "Example", or it can be a Text property. In that case, input it as prop("Example"), assuming "Example" is a text property.
The following style_1, style_2, …., style_n are the style formatting options you can apply.
Formatting Style | Output |
"b" | Bold text |
"u" | Underlined text |
"i" | Italic text |
"c" | Code text |
"s" | Strikethrough text |
Formatting Style | Output |
"gray" | Gray text |
"brown" | Brown text |
"orange" | Orange text |
"yellow" | Yellow text |
"green" | Green text |
"blue" | Blue text |
"purple" | Purple text |
"pink" | Pink text |
"red" | Red text |
"color_background" | Background color (replace 'color' with any valid color name in the above options) |
Example of style()
Let's look at a couple of examples to understand how the style formula works.
examplar
Search
conclusion
Thank you for reading this tutorial! If you found it helpful, be sure to check out shop for my beautiful templates, which I am confident enough to say are a game-changer Subscribe to my newsletter and feel free to follow me on my social media for updates!
Happy Notion(ing)!