Callout Metadata

approved

by Erin Skidds

Add & Read metadata tokens on callouts. Works with your existing callouts, no need to change your syntax. - This plugin has not been manually reviewed by Obsidian staff.

โ†“ 34 downloadsUpdated 22d agoApache-2.0

Callout Metadata for Obsidian

Note: This plugin is being vibe coded. So, if you are not wanting AI code in your vault, please do not use this plugin. Though I am a full time Full Stack Developer so I can validate none of the code is leaking secrets or collecting personal data if that helps you.

A lightweight Obsidian plugin that extends callouts with pipe-separated metadata tokens. Add width, colors, alignment, visual effects, and custom CSS classes directly inside your markdown without writing custom HTML.

๐Ÿš€ Features

๐Ÿ”ง Flexible Metadata Parsing

  • Pipe-separated tokens: Add metadata after the callout type using |
  • Order independent: Tokens can appear in any order
  • Smart detection:
    • Numbers become width percentages
    • Alignment keywords are detected automatically
    • Style tokens toggle effects
    • Everything else is treated as a color
  • Key/value support: Use css=my-class to inject custom CSS classes

Example:

> [!note|50|orange|center|shadow|rounded]

๐ŸŽจ Dynamic Color Support

Callout colors support any CSS color value:

  • Named colors:

    • red
    • orange
    • teal
  • Hex:

    • #ff0088
  • RGB:

    • rgb(255,100,50)
  • HSL:

    • hsl(200,50%,50%)

The plugin resolves colors dynamically using the browser, meaning there is no predefined color list.

If CSS understands it, Callout Metadata understands it.


๐Ÿ“ Width Control

Numbers automatically become width percentages.

Examples:

> [!note|25]

Creates a 25% width callout.

> [!note|73]

Creates a 73% width callout.

No CSS required.

Any value from 0-100 works.


๐Ÿ“ Alignment

Supported alignment tokens:

TokenResult
leftLeft aligned
centerCenter aligned
rightRight aligned

Example:

> [!info|60|center]

โœจ Style Tokens

Callout Metadata includes several built-in style modifiers.

TokenDescription
shadowAdds a configurable shadow
roundedAdds rounded corners
outlineAdds a colored outline
glassEnables glass styling
gradientEnables gradient styling
borderlessRemoves borders
compactReduces padding
hoverAdds hover animation
stickyEnables sticky positioning

Example:

> [!warning|70|orange|shadow|rounded|glass]

๐Ÿงฉ Custom CSS Classes

Use:

css=my-class

to add custom CSS classes.

Examples:

> [!tip|css=gradient-bg]

Multiple classes are supported:

> [!tip|css=card,highlight]

or:

> [!tip|css=card|css=highlight]

This allows the plugin to work with your own CSS snippets without needing built-in support for every possible design.


๐Ÿ“˜ Usage

Syntax

> [!type|token|token|token] Title
> Content

All tokens can be mixed freely.

Examples:

> [!note|50]
> [!note|orange|shadow]
> [!warning|35|#ff0088|center|rounded|outline]
> [!tip|css=my-card|70|gradient|hover]

Token Reference

TokenExampleDescription
Number50Sets width percentage
leftleftAlign left
centercenterCenter align
rightrightAlign right
shadowshadowAdds shadow
roundedroundedAdds rounded corners
outlineoutlineAdds outline
glassglassGlass effect
gradientgradientGradient styling
borderlessborderlessRemoves border
compactcompactReduces padding
hoverhoverHover animation
stickystickySticky positioning
css=namecss=cardAdds CSS class
Anything elsered, #ff0000Sets callout color

โš™๏ธ Settings

The plugin includes a native settings tab.

Available customization:

  • Border radius
  • Shadow strength
  • Shadow colors
  • Outline width
  • Outline style
  • Outline colors

Changes apply immediately without restarting Obsidian.


๐Ÿ”Œ Style Settings Support

Callout Metadata exposes CSS variables that can also be customized using the Style Settings plugin.

Supported variables include:

VariableDescription
--cm-rounded-radiusRounded corner size
--cm-shadow-strengthShadow size
--cm-shadow-colorShadow color
--cm-outline-widthOutline thickness
--cm-outline-colorOutline color

How It Works

The plugin reads metadata from rendered Obsidian callouts and applies:

Data Attributes

data-width
data-color
data-align
data-shadow
data-rounded
data-outline
data-css

Inline Styles

  • Width percentage
  • Callout color variables

CSS Classes

Custom classes from:

css=my-class

The included stylesheet handles built-in effects while allowing full customization through CSS snippets.


Installation

๐Ÿ“ฆ Obsidian Community Plugins

Pending approval.

๐Ÿงช BRAT Installation

  1. Install the BRAT plugin
  2. Open BRAT settings
  3. Select Add Beta Plugin
  4. Enter:
DudeThatsErin/callout-metadata
  1. Enable the plugin in Community Plugins

Writing Custom CSS

Examples:

/* Target a specific color */
.callout[data-color="red"] {
    border-left: 4px solid red;
}


/* Target custom classes */
.callout.gradient-bg {
    background:
        linear-gradient(
            135deg,
            #667eea,
            #764ba2
        );
}


/* Target outlined callouts */
.callout[data-outline] {
    background: transparent;
}

Support

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.