HelixOverviewComponentsMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingCortexDocsEngramBuildingTraceBuildingRecallDeclaredServicesInsightsGet in touchSource on GitHub
Loading the reference
CodeView SourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA fragment of code inside a line of prose.StableSince 0.1.0TypographyUsageimport'@fusion.dev/helix/code'import'@fusion.dev/helix-headless/code'Preview
API ReferenceRoothelix-codeA fragment of code inside a line of prose.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The code.
PartDescriptioncodeThe <code> element.
CSS PropertyDescription--code-background-colorFill behind the fragment. Defaults to the foreground color at 6%, which looks the same on a light page and a dark one.--code-font-familyThe fragment's typeface. Defaults to the mono face.--code-foreground-colorColor of the fragment's text. Defaults to the foreground color mixed toward foreground-muted.--code-paddingSpace either side of the fragment. Defaults to half of space-2xs, so a bracket next to the fragment sits close to it.--code-radiusCorner radius of the wash. Defaults to radii-sm.--code-sizeThe fragment's size. Defaults to text-sm.
Custom stateDescriptionsettledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Roothelix-headless-codeA fragment of code inside a line of prose.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The code.
PartDescriptioncodeThe <code> element.
Custom stateDescriptionsettledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Examples
NameDescriptionPreviewA fragment of code inside a line of prose.PreviewA fragment of code inside a line of prose.