Arc
ComponentsBlocksDocsPricingTry the demo
Get Pro
Introduction
Installation
Theming
Motion
AI and MCP
Changelog
Metrics dashboardPro
KPI drilldownPro
Metric explorerPro
Revenue explorerPro
MRR waterfallPro
Cohort retentionPro
Usage forecastPro
Journey flowPro
Uptime statusPro
Choropleth explorerPro
Connected scatterPro
Horizon chartPro
Account healthPro
Market terminalPro
Budget variancePro
Small multiplesPro
Line replayPro
AI chatPro
AI composerPro
AI answerPro
Model pickerPro
Model arenaPro
Prompt studioPro
Document extractionPro
Agent memoryPro
AI side panelPro
AI inline editNewPro
Research runPro
AI insight cardPro
Catch upPro
AI feature launchPro
AI search barPro
AI setup wizardPro
Call insightsPro
Lead scoringPro
Agent runPro
Agent tasksPro
Agent approvalsPro
Agent routinesPro
Agent orchestratorPro
MCP serversPro
Knowledge basePro
Eval suitePro
Agent builderPro
Agent galleryPro
SidebarPro4
Page header
Command palette
Notification center
Selection toolbarPro
Empty states
Search resultsPro
Login and sign up5, free and Pro variants
Onboarding illustrationPro
OTP input
Multi-step formPro
Two-factor setupPro
Magic linkPro
Settings pagePro
Settings commandPro
Security settingsPro
Billing overviewPro
Usage billingPro
Cancel flowPro
Onboarding surveyPro
Spend alertPro
Team membersPro
Invite peoplePro
Team directoryPro
Roles and permissionsPro
Profile pagePro
API keysPro
WebhooksPro
IntegrationsPro
Environment variablesPro
Domain verifyPro
Webhook testerPro
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Live checkoutPro
Seat managerPro
Credit top-upPro
Invoice studioPro
Wallet cardPro
Delivery trackerPro
Product listingPro
Product detailPro
Seat mapNewPro
Activity feedPro
Inbox triagePro
Support conversationPro
Support widgetPro
Help centerPro
Feature votingPro
File upload
Media playerPro
Week calendarPro
Availability pickerPro
Project boardPro
Release readinessPro
Kanban boardPro
Feedback boardPro
Smart schedulerPro
Task breakdownPro
Goal trackerPro
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrainPro
Revenue globePro
Customer galaxyPro
Semantic zoomPro
Layout morphPro
Exploded viewPro
What’s new4 new
BlocksAI inline edit

AI inline edit

Pro

A document you edit with AI in place: ⌘K on a selection, watch the rewrite stream in as a diff, accept each change, and Tab through ghost text.

Live block · sample data

When to use

  • Rewriting a selection: shorten, clarify, change tone or fix grammar in place.
  • Inline autocomplete while writing documents or messages.
  • Any AI suggestion that should be reviewed as a diff before it lands.

When not to use

  • Rich formatting such as headings, lists or links; the block edits plain paragraphs.
  • Asking questions about a page; use ai-side-panel.
  • A single prompt box without a document; use ai-composer.

Installation

Pro source and install commands unlock with a Pro plan.

Usage

Use this to add AI editing to a document or notes page. Pass onRequestEdit to call your model with the selection and instruction; suggestions in the preview are scripted.

example.tsx
1import { AiInlineEdit } from "@/components/arc/blocks/ai-inline-edit/ai-inline-edit";2 3export function Notes({ doc }: { doc: EditorDocument }) {4  return (5    <AiInlineEdit6      defaultDocument={doc}7      onRequestEdit={async function* (request, signal) {8        const res = await fetch("/api/rewrite", { method: "POST", body: JSON.stringify(request), signal });9        const reader = res.body!.pipeThrough(new TextDecoderStream()).getReader();10        for (;;) { const { value, done } = await reader.read(); if (done) return; yield value; }11      }}12      onSuggest={(request, signal) => fetch("/api/complete", { method: "POST", body: JSON.stringify(request), signal }).then(r => r.json())}13      onChange={saveDocument}14    />15  );16}
Built fromButton

API reference

AiInlineEdit

A document you edit with AI in place. Select text and a small Edit bubble appears; Cmd or Ctrl + K opens a compact prompt anchored under the selection with quick actions and a free instruction. The rewrite streams in as an inline word diff: deletions strike through as the stream passes them, insertions develop in highlighted, and text the model has not reached yet waits dimmed. Review each change from its own mini toolbar or all at once, then undo. At the end of a paragraph, ghost text suggests how to continue and Tab accepts it.

PropTypeDefaultDescription
defaultDocumentEditorDocumentsample launch planTitle and plain text paragraphs to start from.
onRequestEdit(request: EditRequest, signal: AbortSignal) => AsyncIterable<string> | Promise<string>scriptedEditReturns replacement text for the selection as streamed deltas or one string. The request carries the text, instruction, quick action id, surrounding text and paragraph index. Stop aborts signal.
onSuggest(request: CompletionRequest, signal: AbortSignal) => Promise<string | null>scriptedCompletionReturns ghost text to continue a paragraph from the caret, or null. Called after a short pause with the caret at the end of a paragraph; typing or moving on aborts it.
actionsQuickAction[]Shorten, Make clearer, Friendlier tone, More formal, Fix grammarQuick actions in the prompt, each with an id, label and the instruction it sends.
onChange(document: EditorDocument) => void–Called after typing settles, an edit is applied, a completion is accepted, or undo and redo move.
author{ name: string; photo: string }Chloe NguyenThe person shown in the header. The preview uses a local portrait from public/media/people.
classNamestring–Class on the root element.

Keyboard interactions

Cmd/Ctrl+K
Opens the prompt on the selection, grown to whole words. With no selection it takes the sentence around the caret. Pressing it again closes the prompt.
Arrow UporArrow Down, Enter
In the prompt, move through the quick actions and run one. With text typed, the first option sends it as a free instruction.
Escape
Closes the prompt and restores the selection, stops a streaming edit, rejects all changes in review, or dismisses ghost text.
Tab
Accepts ghost text at the caret. In review, moves between changes.
EnterorBackspace
On a focused change, accepts or rejects it and moves to the next one.
Cmd/Ctrl+Enter
Accepts all remaining changes.
Cmd/Ctrl+Z, Shift+Cmd/Ctrl+Z
Undo and redo AI edits when focus is outside the text; while typing, the browser's own undo applies.
Enter, Backspace at a paragraph start
Split a paragraph at the caret, or join it with the one above.

Accessibility

  • The editor is a labelled region; each paragraph is a native contenteditable, so caret movement, selection and screen reader editing work as usual.
  • The prompt is a labelled dialog with a combobox input and a listbox of actions using aria-activedescendant.
  • Each change in review is a focusable group named with what it does, such as Change "very careful" to "carefully", with Enter and Backspace to decide.
  • Ghost text is aria-hidden and never part of the paragraph's text; the footer names the keys to accept or dismiss it.
  • Streaming, review and applied states are announced with role status; failures use role alert with Try again. Deletions and insertions pair color with strike through and highlight.
  • The block claims Cmd/Ctrl + K only while focus is inside it, so an app wide command menu still works elsewhere.

Motion

  • One floating layer carries the whole edit: it opens under the selection, morphs its size on the smooth spring from prompt to a Stop status bar to the review bar to an Applied receipt, and follows the diff as it grows.
  • The rewrite is paced like any stream: buffered, drained on a frame loop that tracks the arrival rate, snapped to whole words. Inserted words develop in with opacity and a small blur that clears; deleted words have their strike drawn across as the stream passes them.
  • While streaming, a short word matched far ahead is not trusted yet, so the diff only grows at the stream edge and never flickers between alignments.
  • The active quick action is marked by a highlight that slides between rows on the snappy spring. Hunk toolbars fade up on hover or focus; a decided change settles with a brief tint.
  • Accepted ghost text glows for a moment using the CSS highlight API, without touching the text.
  • Reduced motion shows diffs, ghost text and the layer without fades, sweeps or morphs.

Responsive behavior

  • The page column stays at a comfortable reading width and tightens its gutters below 560px container width, where the title steps down.
  • The prompt keeps to 320px or the page width, whichever is smaller, and is clamped inside the page; review bars wrap onto two lines when narrow.
  • On touch, selecting text shows the Edit bubble, which opens the same prompt.

Performance

  • Paragraphs are uncontrolled contenteditables that render once, so typing never re-renders them and the caret never jumps.
  • The word diff is a small dynamic program over the selection, recomputed only when the revealed suggestion moves by a word.
  • Ghost text is a single non editable span appended at the caret; nothing else in the paragraph is touched.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Choose this to add AI rewriting and autocomplete to a notes, docs or email editor where people must stay in control of every change.
  • Return only the replacement for the selected text, not the whole paragraph; the block diffs it word by word against the selection.
  • Stream deltas when you can; stopping keeps the words already shown as reviewable changes and leaves the rest of the original untouched.
  • Keep completions short, one clause or sentence, and return null when unsure; they only appear with the caret at the end of a paragraph.
  • An edit applies to one paragraph; a selection that spans paragraphs is clamped to the first one.
/components/blocks/ai-inline-edit/markdown

The full library index for assistants is at /llms.txt.

Related

AI side panelProBlockAn assistant docked beside a page that reads it and edits it: ask about the page or a selected passage, review each edit as a word diff, and apply it with a tint sweep on the page and one-click undo.AI composerProBlockThe prompt box at the bottom of an AI app: files upload in place, / opens commands, @ inserts mentions, a model and effort menu sits in the toolbar, and the send button turns into a stop control ringed by the reply's progress.AI chatProBlockA full-screen AI chat where answers stream in as markdown with folding reasoning, tool chips and cited sources. People can switch chats and models, edit or retry a message into versions, rate replies and stop a reply mid-stream.Rich text editorComponentA lightweight editor with markdown shortcuts, a floating toolbar, a slash menu, and HTML and markdown output.
PreviousResearch runNextKPI drilldown
Arc · 132 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown
Offline mode launch planChloe NguyenSavingSaved

Offline mode launch plan

We are going to be launching offline mode for the Field app on October 14. This is a really big release for us, and it basically touches every single part of the sync engine, so we want to be very careful about how we actually roll it out to customers.

Crews in rural areas has been asking for this for over a year. Right now, if a technician loses signal in the middle of an inspection, the form just stops saving and they have to start over when they get back into coverage, which is honestly a really frustrating experience.

The rollout happens in three stages. Internal teams and 20 pilot customers get access on October 14. We expand to every Business plan on October 28 if the sync error rate stays under 0.5 percent, and offline mode becomes the default for everyone in November.

Support should expect questions about conflicts, where two people edits the same record while offline. The app keeps both versions and asks the last person to sync which one to keep, so nothing is lost silently.

Next week we will

Select text and press ⌘K to edit with AI185 words