Knit UI
GitHub

Playground

Loading playground…

false
Playground
<Code
  block={false}
>
  npm install @knitui/components
</Code>

Examples

Inline

Inline code sits inside running prose without breaking the line.

Loading example…

InlineSourceStorybook

Block

Block code spans the full container width, suitable for multi-line snippets.

Loading example…

BlockSourceStorybook

Inline Vs Block

Inline and block variants side by side for a quick comparison.

Loading example…

Inline Vs BlockSourceStorybook

Themed

The palette ramp follows the active theme — same component, different accent.

Loading example…

ThemedSourceStorybook

Themed Block

Block code themed to different accents for visual regression.

Loading example…

Themed BlockSourceStorybook

In Prose

Code embedded in a realistic paragraph of explanatory text.

Loading example…

In ProseSourceStorybook

Props

PropTypeDefaultDescription
blockboolean | undefinedfalseRender as a full-width `<pre>` block instead of inline `<code>`.
disabled systemboolean | undefinedSpecifies the disabled state of the text view for testing purposes.
size systemstring | number | undefined
theme systemThemeName | null | undefined
unset · blue · red · green · yellow · pink · gray
Active theme accent — recolors the code surface via the palette ramp.
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiTextElement> | undefined

Plus 507 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.