Primitive
Code
Auto-emitted from DSKintsugiCatalog.code. Tier atom.
Live Preview
Call katagami.code("value") to render
an inline snippet inside body copy. The
TextStyle.mono token drives
font, size, and color consistently across surfaces.
// katagami DSL — block code example
let view = katagami.vstack {
katagami.heading("Portfolio Overview", style: .h1)
katagami.code(block: "let delta = position.value - position.costBasis")
}
Native · macOS
DSL usage
// Inline
katagami.code("TextStyle.mono")
// renders: <code> — JetBrains Mono 400 13 px, rgba(213,165,96,0.10) bg, var(--navy-deep) color
// Block
katagami.code(block: "let delta = position.value - position.costBasis")
// renders: <pre><code> — navy-deep bg (--sb-code-bg), cream text (--sb-code-text)
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
content |
String | |
Code content (inline or block string) |
block |
Bool | false |
false → <code> inline | true → <pre><code> block |
language |
String? | nil |
Optional language hint for syntax-highlighter pass-through |
density |
Density | regular |
compact | regular | expanded |
locale |
Locale | en |
BCP-47 locale tag for locale-aware rendering |
Used in
KatagamiScreens c-tech sigma-analytics