Skip to content

code/shiki-theme

import { … } from 'zidane-ui'ui/src/code/shiki-theme.ts

Functions#

defaultShikiThemeFunction#

The neutral code theme for an appearance: what a theme without a designed counterpart uses.

TypeScript
function defaultShikiTheme(appearance: Appearance): CodeThemeId
Parameters
NameTypeDescription
appearanceAppearance

'dark' or 'light'.

CodeThemeId

github-dark-default or github-light-default.

ui/src/code/shiki-theme.ts:32

shikiThemeForFunction#

The bundled code theme for a kit theme: its designed counterpart (Catppuccin, Gruvbox…), else the neutral theme of its appearance.

TypeScript
function shikiThemeFor(themeId: string, appearance: Appearance): CodeThemeId
Parameters
NameTypeDescription
themeIdstring

The kit theme's id (BUILTIN_THEMES key or an extension theme's id).

appearanceAppearance

The theme's appearance, for the fallback.

CodeThemeId

A code theme id.

ui/src/code/shiki-theme.ts:44