Code window

Code window is a Snippet code block from Orvain UI, built for React and Vue with a matching Figma frame.

Best for

Docs and code review on a light page: point at lines, discuss them, see the diff

Anatomy

Grey frame holding a white code card · file name, Code / Diff, Copy circle that opens into “Copied” · monospace lines in one tab stop, Shift for a range · gutter pill (Comment ⌥C, Copy lines) · pinned comment with replies

MCPConnect the MCP server
SaveBar.tsx
import { SkeuomorphicButton } from '@orvain/react';
type SaveBarProps = { onSave: () => void };
type SaveBarProps = { dirty: boolean; onSave: () => void };
export function SaveBar({ onSave }: SaveBarProps) {
export function SaveBar({ dirty, onSave }: SaveBarProps) {
return (
<SkeuomorphicButton variant="secondary" size="md" onClick={onSave}>
<SkeuomorphicButton variant="primary" intent="brand" size="md" pill disabled={!dirty} onClick={onSave}>
Save changes
</SkeuomorphicButton>
);
}
Mia KovačDesign
Brand intent on the primary action only. Cancel and Reset stay neutral, so keep intent="brand" here.
Noah ReedEng
Agreed. @Mia I'll leave Cancel on the default.

In the Orvain Library

Get Code window for your product

The block’s code in React and Vue, its frame in the Figma file, and the Orvain MCP so your AI tools build with it. Part of every Library plan, alongside every other block.

  • React
  • Vue
  • Figma frame
  • Orvain MCP

About this block

Part of Snippet code

What’s inside

05parts

The pieces it is built from. Keep them all, or drop the ones your product doesn’t need.

  1. Grey frame holding a white code card
  2. File nameCode / Diff, Copy circle that opens into “Copied”
  3. Monospace linesin one tab stop, Shift for a range
  4. Gutter pillComment ⌥C, Copy lines
  5. Pinned commentwith replies

Responsive behaviour

690 px

Drawn at this width and never stretched past it. Below it, controls, text and spacing step down from the box the block sits in, not the window.

1440pxDesktop · 12 columns

When to use it

Where Snippet code earns its place

Reach for Snippet code

  • Documentation whose next step is the reader pasting the code into their own file.
  • A changelog showing exactly what a migration changes.
  • An install command on a landing page, where the command is the proof.
  • Support answers that hand over a config file the reader has to keep intact.

Reach for something else

  • A flag, a function name or a path inside a sentence. Inline code keeps the sentence moving; a panel stops it.
  • Code the reader is meant to change and run. That wants an editor or an embedded sandbox; a snippet is read-only on purpose.
  • A whole file. Nobody reads past a screenful: show the lines that matter and link to the source for the rest.

Accessibility

06to keep

What the block ships with. Hold on to these as you make it yours.

  • Named controlsEvery icon-only button keeps a text label, so a screen reader can say what it does.
  • Keyboard firstEvery control is reachable with Tab, and its focus ring stays visible.
  • More than colourA state never rides on colour alone; a mark or a word goes with it.
  • Contrast holdsRetheme freely, but keep text at or above the contrast it ships with.
  • Calm motionFor visitors who ask for reduced motion, things simply appear.
  • Room to hitTargets stay at least 24px, with space between neighbours.

Notes for AI

1 line

Is all your assistant needs. With the Orvain MCP connected, it builds the block from your own tokens and components.

Add the Orvain “Code window” block to this page: grey frame holding a white code card, file name, Code / Diff, Copy circle that opens into “Copied”, monospace lines in one tab stop, Shift for a range, gutter pill (Comment ⌥C, Copy lines), pinned comment with replies.

Works in
Connect the MCP

Questions about Code window.

What is the Code window block?

Code window is a Snippet code block from Orvain UI, built for React and Vue with a matching Figma frame. Best for docs and code review on a light page: point at lines, discuss them, see the diff.

What is the Code window block made of?

Is the Code window block responsive?

Is the Code window block accessible?

How do I add the Code window block to my project?

When should I not use a Snippet code block?

More Snippet code blocks

All Snippet code

Flush code

Dense docs and changelogs: the same review snippet with the code running edge to edge

Dark window

Landing pages and dark docs: the snippet reads as an editor you can comment in

Dark flush

Terminal-style review blocks: dark, edge to edge, with the change history in place

The Orvain Dispatch

Premium components, free in your inbox.

Join the Orvain Dispatch and get production-ready components, free to keep: React and Vue code plus the Figma frame, yours to ship.

Just components, never spam. You can unsubscribe anytime.