Properties3
2The obsidian-bases module enables specialized data views (Tables, Lists, Cards) leveraging parsed metadata from your vault. It supports complex filtering, formula calculation, and aggregations.
File Format
Base files use the .base extension and contain valid YAML.
filters:
and:
- file.hasTag("project")
- 'status == "active"'
formulas:
days_remaining: '(date(due) - today()) / 86400000'
views:
- type: table
name: "Active Projects"
order:
- file.name
- status
- formula.days_remaining
Filter Syntax
Filters narrow down results using text expressions and logical operators.
Structure
# Simple
filters: 'status == "done"'
# Logical AND
filters:
and:
- 'priority > 1'
- 'file.hasTag("urgent")'
# Logical OR
filters:
or:
- 'category == "A"'
- 'category == "B"'
Properties
You can filter on:
- File Metadata:
file.name,file.mtime,file.size,file.tags,file.folder - Frontmatter:
status,author,priority(any key in your markdown frontmatter) - Computed Formulas:
formula.my_calc
Formulas
Formulas allow you to compute new values.
formulas:
# Arithmetic
total: "price * quantity"
# Conditionals
status_icon: 'if(done, "✅", "⏳")'
# Date Math
days_old: '(now() - file.ctime) / 86400000'
View Types
- Table: Standard row/column layout.
- Cards: Grid layout, great for items with images (
coverproperty). - List: Simple list of items.
- Map: Geographic map (requires
lat/lngproperties).
Component Usage
The module exposes the ::obsidian-base MDC component for rendering frames.
Full Syntax
Pass structured configuration via individual props:
::obsidian-base{source="Projects" views='[{"type":"table"}]'}
::
Shorthand Syntax
For inline use in markdown pages, a simplified syntax is available:
::obsidian-base
---
folder: /Blog
layout: list
sort: date
direction: desc
limit: 10
---
::
| Prop | Type | Description |
|---|---|---|
folder | string | Folder to query (creates a file.inFolder() filter) |
layout | string | View type: table, cards, or list |
sort | string | Property to sort by (prefix with - for descending) |
direction | string | Sort direction: asc or desc |
limit | number | Maximum number of results |
The shorthand props are translated into the full BaseConfig structure internally.
Standalone .base files use the full YAML format and are automatically converted into this component by the obsidian-bases module.