Spaces:
Sleeping
Sleeping
File size: 4,732 Bytes
c63ff03 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
---
aliases:
- How to/Use callouts
---
Use callouts to include additional content without breaking the flow of your notes.
To create a callout, add `[!info]` to the first line of a blockquote, where `info` is the _type identifier_. The type identifier determines how the callout looks and feels. To see all available types, refer to [[#Supported types]].
```markdown
> [!info]
> Here's a callout block.
> It supports **Markdown**, [[Internal link|Wikilinks]], and [[Embed files|embeds]]!
> ![[Engelbart.jpg]]
```
> [!info]
> Here's a callout block.
> It supports **Markdown**, [[Internal links|Wikilinks]] and [[Embed files|embeds]]!
> ![[Engelbart.jpg]]
Callouts are also supported natively on [[Introduction to Obsidian Publish|Obsidian Publish]].
> [!note]
> If you're also using the Admonitions plugin, you should update it to at least version 8.0.0 to avoid problems with the new callout feature.
### Change the title
By default, the title of the callout is its type identifier in title case. You can change it by adding text after the type identifier:
```markdown
> [!tip] Callouts can have custom titles
> Like this one.
```
> [!tip] Callouts can have custom titles
> Like this one.
You can even omit the body to create title-only callouts:
```markdown
> [!tip] Title-only callout
```
> [!tip] Title-only callout
### Foldable callouts
You can make a callout foldable by adding a plus (+) or a minus (-) directly after the type identifier.
A plus sign expands the callout by default, and a minus sign collapses it instead.
```markdown
> [!faq]- Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed.
```
> [!faq]- Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when collapsed.
### Nested callouts
You can nest callouts in multiple levels.
```markdown
> [!question] Can callouts be nested?
> > [!todo] Yes!, they can.
> > > [!example] You can even use multiple layers of nesting.
```
> [!question] Can callouts be nested?
> > [!todo] Yes!, they can.
> > > [!example] You can even use multiple layers of nesting.
### Customize callouts
[[CSS snippets]] and [[Community plugins]] can define custom callouts, or even overwrite the default configuration.
To define a custom callout, create the following CSS block:
```css
.callout[data-callout="custom-question-type"] {
--callout-color: 0, 0, 0;
--callout-icon: lucide-alert-circle;
}
```
The value of the `data-callout` attribute is the type identifier you want to use, for example `[!custom-question-type]`.
- `--callout-color` defines the background color using numbers (0–255) for red, green, and blue.
- `--callout-icon` can be an icon ID from [lucide.dev](https://lucide.dev), or an SVG element.
> [!warning] Note about lucide icon versions
> Obsidian updates Lucide icons periodically. The current version included is shown below; use these or earlier icons in custom callouts.
> ![[Credits#^lucide]]
> [!tip] SVG icons
> Instead of using a Lucide icon, you can also use a SVG element as the callout icon.
>
> ```css
> --callout-icon: '<svg>...custom svg...</svg>';
> ```
### Supported types
You can use several callout types and aliases. Each type comes with a different background color and icon.
To use these default styles, replace `info` in the examples with any of these types, such as `[!tip]` or `[!warning]`.
Unless you [[#Customize callouts]], any unsupported type defaults to the `note` type. The type identifier is case-insensitive.
> [!note]
> ```md
> > [!note]
> > Lorem ipsum dolor sit amet
> ```
---
> [!abstract]-
> ```md
> > [!abstract]
> > Lorem ipsum dolor sit amet
> ```
Aliases: `summary`, `tldr`
---
> [!info]-
> ```md
> > [!info]
> > Lorem ipsum dolor sit amet
> ```
---
> [!todo]-
> ```md
> > [!todo]
> > Lorem ipsum dolor sit amet
> ```
---
> [!tip]-
> ```md
> > [!tip]
> > Lorem ipsum dolor sit amet
> ```
Aliases: `hint`, `important`
---
> [!success]-
> ```md
> > [!success]
> > Lorem ipsum dolor sit amet
> ```
Aliases: `check`, `done`
---
> [!question]-
> ```md
> > [!question]
> > Lorem ipsum dolor sit amet
> ```
Aliases: `help`, `faq`
---
> [!warning]-
> ```md
> > [!warning]
> > Lorem ipsum dolor sit amet
> ```
Aliases: `caution`, `attention`
---
> [!failure]-
> ```md
> > [!failure]
> > Lorem ipsum dolor sit amet
> ```
Aliases: `fail`, `missing`
---
> [!danger]-
> ```md
> > [!danger]
> > Lorem ipsum dolor sit amet
> ```
Alias: `error`
---
> [!bug]-
> ```md
> > [!bug]
> > Lorem ipsum dolor sit amet
> ```
---
> [!example]-
> ```md
> > [!example]
> > Lorem ipsum dolor sit amet
> ```
---
> [!quote]-
> ```md
> > [!quote]
> > Lorem ipsum dolor sit amet
> ```
Alias: `cite`
|