---
title: '@svartz/ui'
updated_at: '2026-11-26T01:47:51+01:00'
description: >-
  @svartz/ui/runtime @svartz/ui/color mode @svartz/ui/brand @svartz/ui/syntax
  @svartz/ui/reference Breadcrumb CommentsSettings — Giscus settings a theme
  passes to . ContentComponentProps — Props passed to a content override after
  Markdown plugins finish parsing. ExplorerItem — How a page lists in the
---

# @svartz/ui

## Entry points

- [@svartz/ui/runtime](https://svartz.dev/reference/api/ui/runtime.md)
- [@svartz/ui/color-mode](https://svartz.dev/reference/api/ui/color-mode.md)
- [@svartz/ui/brand](https://svartz.dev/reference/api/ui/brand.md)
- [@svartz/ui/syntax](https://svartz.dev/reference/api/ui/syntax.md)
- [@svartz/ui/reference](https://svartz.dev/reference/api/ui/reference.md)

## Interfaces

- [Breadcrumb](https://svartz.dev/reference/api/ui/breadcrumb.md)
- [CommentsSettings](https://svartz.dev/reference/api/ui/commentssettings.md) — Giscus settings a theme passes to `Comments`.
- [ContentComponentProps](https://svartz.dev/reference/api/ui/contentcomponentprops.md) — Props passed to a content override after Markdown plugins finish parsing.
- [ExplorerItem](https://svartz.dev/reference/api/ui/exploreritem.md) — How a page lists in the explorer when a theme renders it specially: a fixed-width badge beside a monospace label.
- [ExplorerNode](https://svartz.dev/reference/api/ui/explorernode.md)
- [FolderLayout](https://svartz.dev/reference/api/ui/folderlayout-interface.md)
- [FolderSection](https://svartz.dev/reference/api/ui/foldersection.md)
- [LinkSegment](https://svartz.dev/reference/api/ui/linksegment.md)
- [LogoSettings](https://svartz.dev/reference/api/ui/logosettings.md) — The site's mark beside its title. `dark` replaces `src` in dark mode; `alt` is empty because the title names the site.
- [ReferenceSource](https://svartz.dev/reference/api/ui/referencesource.md) — Where a page's subject is defined: a source file or line.
- [ResolvedCallout](https://svartz.dev/reference/api/ui/resolvedcallout.md)
- [SearchDocument](https://svartz.dev/reference/api/ui/searchdocument.md) — A published note as the artifact producer stores it for search.
- [SearchHit](https://svartz.dev/reference/api/ui/searchhit.md)
- [SettingsLink](https://svartz.dev/reference/api/ui/settingslink.md)
- [TextSegment](https://svartz.dev/reference/api/ui/textsegment.md)
- [ThemePageProps](https://svartz.dev/reference/api/ui/themepageprops.md) — Props every theme layout and page component receives from the Svartz runtime (`SvartzVaultPage`). Layouts also get `children`; pages also get `contentComponents`. Prefer `vault`: its URLs include the deployment base.
- [ThemeRouteMatch](https://svartz.dev/reference/api/ui/themeroutematch.md) — The route the runtime matched for this page.
- [ThemeSettings](https://svartz.dev/reference/api/ui/themesettings-interface.md) — Settings every first-party theme reads from the vault's `theme` config.
- [UiFolderEntry](https://svartz.dev/reference/api/ui/uifolderentry.md)
- [UiIndexEntry](https://svartz.dev/reference/api/ui/uiindexentry.md)
- [UiTagEntry](https://svartz.dev/reference/api/ui/uitagentry.md)

## Types

- [BadgeHue](https://svartz.dev/reference/api/ui/badgehue.md) — A signal hue from the design tokens (`--sv-hue-<name>`), or `neutral`.
- [CalloutType](https://svartz.dev/reference/api/ui/callouttype.md)
- [LinkKind](https://svartz.dev/reference/api/ui/linkkind.md)
- [SearchOptions](https://svartz.dev/reference/api/ui/searchoptions.md)
- [SiteActions](https://svartz.dev/reference/api/ui/siteactions-type.md)
- [ThemeTokens](https://svartz.dev/reference/api/ui/themetokens.md) — The vault's `theme.tokens`: any design token by name, with or without the `--sv-` prefix (`accent`, `paper`, `radius-m`, `--sv-font-sans`). Config wins over the theme's own tokens, which win over the Svartz defaults.
- [ThemeTokenValue](https://svartz.dev/reference/api/ui/themetokenvalue.md) — A token value for both colour schemes, or one per scheme.

## Functions

- [assetHref](https://svartz.dev/reference/api/ui/assethref.md) — The published URL of an attachment named in a note's frontmatter (`cover: hero.jpg`, `image: portrait.svg`); external URLs pass through. Undefined when the vault didn't publish it. Resolves like the pipeline, which publishes attachments named by top-level `image`, `cover`, and `socialImage`: relative to the note's file, then from the vault root, then by a basename only one attachment has.
- [buildBreadcrumbs](https://svartz.dev/reference/api/ui/buildbreadcrumbs.md) — Home, each folder the note sits in, then the note. A folder note ends its own folder's trail instead of repeating it. A slug no folder record places falls back to its own segments.
- [buildExplorerTree](https://svartz.dev/reference/api/ui/buildexplorertree.md) — The vault as a tree: folders first, then notes. Each group sorts by `order` frontmatter, then by a theme's explorer row (`itemOf`), then in natural order by title; a folder takes its folder note's `order`. The home note is left out (the site title links home). A folder links its folder note (`guides/index.md`) when one exists, otherwise its generated folder page.
- [classifyLink](https://svartz.dev/reference/api/ui/classifylink.md) — Classify a link in rendered note content. Internal links get previews and the internal style; files, heading anchors, and footnote links stay quiet.
- [count](https://svartz.dev/reference/api/ui/count.md) — `1 note`, `3 notes`.
- [createSearch](https://svartz.dev/reference/api/ui/createsearch.md) — Build a query function over the vault's search index. `documents` carries final URLs; the stored index may predate the deployment base, so hrefs come from it.
- [excerpt](https://svartz.dev/reference/api/ui/excerpt.md) — About `words` words of `content`, centred on the first matched term.
- [fetchPreview](https://svartz.dev/reference/api/ui/fetchpreview.md) — Cloned preview nodes for `href`. IDs get a prefix so previews never collide with the host page's headings; `scrollTarget` finds the linked heading inside them.
- [folderBreadcrumbs](https://svartz.dev/reference/api/ui/folderbreadcrumbs.md) — Home, then each folder down to `folder` (a folder page's trail).
- [folderContents](https://svartz.dev/reference/api/ui/foldercontents.md) — Every note under a folder, nested ones included, plus its direct subfolders. The folder's own note (`log/index.md`) is its page, not an item.
- [folderLayout](https://svartz.dev/reference/api/ui/folderlayout-function.md) — Where each note's file sits, read from the index's folder records. Slugs can't tell: when two files want one URL, one gets a suffix (`guides/index.md` may publish as `guides-2`), and a root `guides.md` may hold the folder's slug.
- [formatDate](https://svartz.dev/reference/api/ui/formatdate.md) — Format a note date as `Sep 4, 2026`. Dates are calendar days, so format in UTC.
- [highlight](https://svartz.dev/reference/api/ui/highlight.md) — Split text into matched and plain runs, so results render highlights without HTML.
- [isoDate](https://svartz.dev/reference/api/ui/isodate.md) — ISO date for `<time datetime>`.
- [isRecord](https://svartz.dev/reference/api/ui/isrecord.md)
- [newestFirst](https://svartz.dev/reference/api/ui/newestfirst.md)
- [noteDate](https://svartz.dev/reference/api/ui/notedate.md) — The date a list shows for a note: last modified, else published, else created. An unparseable date is skipped, so one bad value can't hide the note's date.
- [notesTagged](https://svartz.dev/reference/api/ui/notestagged.md) — Notes tagged `tag` or a nested tag under it (`tag/…`).
- [openFolderIds](https://svartz.dev/reference/api/ui/openfolderids.md) — Folder ids to open so `folder` shows in the explorer: it and every folder above it.
- [pageCrumbs](https://svartz.dev/reference/api/ui/pagecrumbs.md) — Breadcrumbs for any page, ending with the page itself (Quartz's `showCurrentPage`). List pages walk through their index route; home and missing pages have none. Themes with other list routes pass their own `titles`.
- [parseSearchQuery](https://svartz.dev/reference/api/ui/parsesearchquery.md) — `#guides setup` searches notes tagged `guides` for "setup".
- [readingTime](https://svartz.dev/reference/api/ui/readingtime.md) — `N min read`, rounded up, at least one minute.
- [readLinks](https://svartz.dev/reference/api/ui/readlinks.md) — A `{ Label: 'url' }` map from user config as ordered links; non-string URLs are dropped.
- [readSources](https://svartz.dev/reference/api/ui/readsources.md) — The page's `source`: a URL, `{ label, href }`, or a list of either.
- [resolveCallout](https://svartz.dev/reference/api/ui/resolvecallout.md) — Resolve an author-written callout type (`[!faq]`, `[!my-idea]`) to its canonical type, styling, and title. Unknown types render as notes but keep their own title.
- [slugToHref](https://svartz.dev/reference/api/ui/slugtohref.md)
- [sourceLabel](https://svartz.dev/reference/api/ui/sourcelabel.md) — A short label for a source URL. A GitHub or GitLab file link reads as its path and line (`src/mcp/tools.ts:23`); any other URL keeps its host and path.
- [tagHrefFor](https://svartz.dev/reference/api/ui/taghreffor.md) — The URL of a tag's page, including the mount path, for tags the index knows or not.
- [themeSettings](https://svartz.dev/reference/api/ui/themesettings-function.md) — Read the vault's `theme` settings. They come from user config, so every field is checked; anything malformed is ignored rather than rendered.
- [themeTokenCss](https://svartz.dev/reference/api/ui/themetokencss.md) — The CSS for `theme.tokens`, or nothing when there are none. The selector is `html:root` so it outranks the `:root` rules in the Svartz defaults and in every theme. Names and values that could escape the rule are dropped.
- [titleFromSlugSegment](https://svartz.dev/reference/api/ui/titlefromslugsegment.md)
- [topLevelSections](https://svartz.dev/reference/api/ui/toplevelsections.md) — Notes grouped by top-level folder, in first-seen order, without the home note. A folder note (`guides/index.md`) links its section instead of listing in it; a folder with only its note is an empty section.
- [wikilinkSegments](https://svartz.dev/reference/api/ui/wikilinksegments.md) — Frontmatter isn't run through the Markdown pipeline, so values like `Home: "[[Vessa]], Lower Wards"` keep raw `[[links]]`. Split such a value into text and linked segments, resolving targets against published notes by title, file name, or slug. Unresolved links become plain text.

## Variables

- [Backlinks](https://svartz.dev/reference/api/ui/backlinks.md)
- [Badge](https://svartz.dev/reference/api/ui/badge.md)
- [Breadcrumbs](https://svartz.dev/reference/api/ui/breadcrumbs.md)
- [BreakAfterSlashes](https://svartz.dev/reference/api/ui/breakafterslashes.md)
- [Callout](https://svartz.dev/reference/api/ui/callout.md)
- [CALLOUT_TYPES](https://svartz.dev/reference/api/ui/callout_types.md) — Obsidian's built-in callout types. Each owns an icon and a signal hue.
- [CodeBlock](https://svartz.dev/reference/api/ui/codeblock.md)
- [ColorModeToggle](https://svartz.dev/reference/api/ui/colormodetoggle.md)
- [Comments](https://svartz.dev/reference/api/ui/comments.md)
- [DescText](https://svartz.dev/reference/api/ui/desctext.md)
- [Embed](https://svartz.dev/reference/api/ui/embed.md)
- [explorerOpenIds](https://svartz.dev/reference/api/ui/exploreropenids.md) — Persisted set of open folder IDs in the explorer.
- [FileTrie](https://svartz.dev/reference/api/ui/filetrie.md)
- [GraphPanel](https://svartz.dev/reference/api/ui/graphpanel.md)
- [Link](https://svartz.dev/reference/api/ui/link.md)
- [LinkPreviews](https://svartz.dev/reference/api/ui/linkpreviews.md)
- [NoteHeader](https://svartz.dev/reference/api/ui/noteheader.md)
- [PageActions](https://svartz.dev/reference/api/ui/pageactions.md)
- [PREVIEW_ATTRIBUTE](https://svartz.dev/reference/api/ui/preview_attribute.md) — Page previews for link hovers and search. A theme marks the part of its page worth previewing with `data-sv-preview`; previews fetch the target URL and clone those nodes. Works for static output and SvelteKit hosts alike.
- [RecentNotes](https://svartz.dev/reference/api/ui/recentnotes.md)
- [SearchBox](https://svartz.dev/reference/api/ui/searchbox.md)
- [SearchDialog](https://svartz.dev/reference/api/ui/searchdialog.md)
- [SiteActions](https://svartz.dev/reference/api/ui/siteactions-variable.md)
- [SiteLogo](https://svartz.dev/reference/api/ui/sitelogo.md)
- [SourceLinks](https://svartz.dev/reference/api/ui/sourcelinks.md)
- [svartzContentComponents](https://svartz.dev/reference/api/ui/svartzcontentcomponents.md) — The shared OFM content slots, ready to spread into a theme's `components`. Pair with `prose.css` on the element that wraps the note body.
- [TableOfContents](https://svartz.dev/reference/api/ui/tableofcontents.md)

## Re-exports

- [SVARTZ_MARK_SVG](https://svartz.dev/reference/api/ui/brand/svartz_mark_svg.md)
- [svartzSocialImage](https://svartz.dev/reference/api/ui/brand/svartzsocialimage.md)
- [COLOR_MODE_KEY](https://svartz.dev/reference/api/ui/color-mode/color_mode_key.md)
- [COLOR_MODE_SCRIPT](https://svartz.dev/reference/api/ui/color-mode/color_mode_script.md)
- [COLOR_MODE_SCRIPT_HASH](https://svartz.dev/reference/api/ui/color-mode/color_mode_script_hash.md)
- [currentColorMode](https://svartz.dev/reference/api/ui/color-mode/currentcolormode.md)
- [setColorMode](https://svartz.dev/reference/api/ui/color-mode/setcolormode.md)
- [ColorMode](https://svartz.dev/reference/api/ui/color-mode/colormode.md)
