Arc
ComponentsBlocksScreensDocsPricingTry the demo
Get Pro
Saved

Docs

IntroductionInstallationThemingMotionAI and MCPChangelog

Components136

ButtonAction buttonSplit buttonButton groupFloating button groupExpanding button groupCopy buttonAction swapIcon morphConfirm morphTheme switcher

Hold to confirmSwipe actionsReactions

Dropdown menuContext menuUser menu

InputTextareaPassword fieldPassword strengthSearch fieldExpanding searchInline edit

Number fieldMoney inputPhone inputScrub inputTag inputMention inputShortcut recorder

SelectComboboxMulti-selectMorph selectChip group

Radio cardsBilling toggleCheckboxRadio groupSwitchSegmented controlRatingToggle group

SliderElastic sliderRange histogram sliderRuler sliderWindow rangeNewProLens rangeNewPro

CalendarDate pickerDate range pickerTime pickerColor pickerEmoji pickerPro

Rich text editorSignature padFile dropzoneAvatar uploadPro

TabsBreadcrumbPaginationMega menu morphProTable of contents progressPro

Scroll areaAccordionExpandable cardResizable panelsExpandable text

DialogDrawerBottom sheetPopoverHover cardTooltipShare accessProConfirm popoverPro

AlertToastToast stackAnnouncement barCookie consentUndo toastPro

ProgressSkeletonStepperCountdownUsage meterOnboarding checklist

AvatarAvatar groupBadgePresence stackPro

CardMetric cardEmpty stateMetric tickerPro

Line chartBar chartDonut chartStreamgraphBrush chartWaffle chartSlope chartSparklineGaugeActivity heatmapAnimated counterRidgelineTreemapSplit barPro

SunburstProSankey flowProFunnel chartProRadar chartProRealtime streamProRace bar chartProData gridPro

Sortable data tableTree tableTree viewReorderable listFilter toolbarCode blockJSON viewer

TimelineComment threadChat thread

Image compareCarouselCard stack

Text revealIn-view titleText morphText shimmer

Blocks122

KPI drilldownProMetric explorerProRevenue explorerProMRR waterfallProCohort retentionProUsage forecastProJourney flowProUptime statusProPivot builderProChoropleth explorerProConnected scatterProHorizon chartProAccount healthPro

Budget variancePro

Small multiplesProLine replayPro

AI chatProAI composerProAI answerProModel pickerProModel arenaProPrompt studioProDocument extractionProAgent memoryProAI side panelProAI inline editProResearch runProAI insight cardProCatch upProAI feature launchProAI search barProAI setup wizardProCall insightsProLead scoringPro

Agent runProAgent tasksProAgent approvalsProAgent routinesProAgent orchestratorProMCP serversProKnowledge baseProEval suiteProAgent builderProAgent galleryPro

SidebarPro4Page headerCommand paletteNotification centerSelection toolbarProEmpty statesSearch resultsPro

Login and sign up5, free and Pro variantsOnboarding illustrationProOTP inputMulti-step formProTwo-factor setupProMagic linkPro

Settings pageProSettings commandProSecurity settingsProBilling overviewProUsage billingProCancel flowProOnboarding surveyProSpend alertPro

Team membersProInvite peopleProRoles and permissionsProProfile pagePro

API keysProWebhooksProIntegrationsProImport wizardNewProEnvironment variablesProDomain verifyProWebhook testerPro

Plan comparisonPricing calculatorProUsage pricingProCart drawerProCheckout summaryProLive checkoutProSeat managerProCredit top-upPro

Wallet cardProDelivery trackerProSeat mapPro

Activity feedProSupport widgetProFeature votingPro

File uploadMedia playerPro

Availability pickerProRelease readinessProFeedback boardProSmart schedulerProTask breakdownProGoal trackerPro

Hero sectionHero signupPro

Scroll storyProSpotlight gridProFeature bentoProComparison table

Logo marqueeStudio perspectivesProStats band

Changelog feedFAQ sectionContact sectionTeam showcaseProBlog grid

Site headerSite footerCTA sectionNewsletter signup

Activity terrainProRevenue globeProCustomer galaxyProSemantic zoomProLayout morphProExploded viewPro

Screens14

Metrics dashboardProMarket terminalPro

Kanban boardProProject boardProGantt timelinePro

Week calendarProMonth calendarNewPro

Team directoryPro

Inbox triageProSupport conversationProHelp centerPro

Product listingProProduct detailProInvoice studioPro

Special components106

Share sheetProAction morphProMorph navProDockProLiquid tab barProOrbit menuPro

Glass menuProGlass segmentedProGlass cardProGlass tab barPro

Sheet stackProWallet stackProControl centerProHolo cardProCard to articleProLink unfurlPro

Product galleryProLightbox galleryProPhoto gridProCover flowPro

Voice orbProNow playingProVoice recorderPro

Booking pillProActivity ringsProTime dialProDate reelPro

Keycap keyboardProSlot textSand textProTypewriter terminalPro

Stretch refreshProMorph loaderProSkeleton morphProBlack holeProCharge sessionPro

Sticker peelProTicket tearProPage curlProOrbit logosProPrize wheelPro

Dot gridProImage trailProGravity wellProInk fluidProCursor trail drawPro

Agent statusProTool callProAgent planProAgent timelineProContext windowProReasoning blockProSource cardsProModel cardProAI workflowProCode suggestionProGhost textProImage generationProDictation buttonProSpeech playerProMeeting summaryProReply draftProAgent handoffProPII redactionProResponse feedbackProLLM cost calculatorProProvider keysProGeneration statsProAI translateProTL;DR toggleProConnector setupProSmart form fillProEnrich columnProTicket routerProAsk your dataProAgent cursorProProvider statusProTraining runProAI commandProStarter promptsProAI mascotProImage revealProAI sparkProPixel mascotProGhost mascotProCube mascotProTone tunerProUpgrade promptProReferral cardProTrial bannerProTeam switcherProLive visitorsProSocial proof toastProInstall snippetPro

Data flowProPayment flowProDNS resolutionProModel trainingProMulti-region failoverProVector searchProBranch graphProAgent loopProMixture of expertsProSpeculative decodingProPrompt cacheProReasoning treePro
What’s new4 new
BlocksOTP input

OTP input

A six digit verification flow with paste support and keyboard navigation.

$pnpm dlx shadcn@latest add @uiarc/otp-input
Pattern · live

When to use

  • Verification codes from email or SMS.
  • Two-factor authentication code entry.

When not to use

  • Use password-field for secrets people type from memory.
  • Use input for any other text.

Installation

Add OTP input with the shadcn CLI, or copy the source by hand.

$pnpm dlx shadcn@latest add @uiarc/otp-inputpnpm dlx shadcn@latest add @uiarc/otp-input

Adds the block and its local dependencies, and installs motion. First time? Add the @uiarc registry to components.json, or use the full URL:

Usage

Use it as part of verification after you have sent a code. Validate the code on your server.

example.tsx
1import { useState } from "react";2import { OtpInput } from "@/components/arc/otp-input/otp-input";3 4export function VerifyCode() {5  const [code, setCode] = useState("");6  return (7    <OtpInput8      label="Verification code"9      description="We sent a 6-digit code to your email."10      value={code}11      onChange={next => { setCode(next); if (next.length === 6) verify(next); }}12      autoFocus13    />14  );15}
Built fromInputKeyboard navigationValidation

API reference

OtpInput

A row of single-character inputs for one-time codes, with paste fill, a gliding focus ring, and animated helper and error copy.

PropTypeDefaultDescription
labelRequiredstring–Visible label and group name; each slot is labelled with it plus its position.
lengthnumber6Number of slots.
valuestring""Current code. Controlled: update it from onChange.
onChange(value: string) => void–Called with the full code after every edit or paste.
descriptionstring–Helper text below the slots.
errorstring–Error text. Sets aria-invalid and shakes the row once when it changes.
inputMode"numeric" | "text""numeric"numeric strips non-digits.
autoFocusbooleanfalseFocuses the first slot on mount.
disabledbooleanfalseDisables every slot.
classNamestring–Merged onto the field wrapper.

Keyboard interactions

0-9orcharacters
Fills the slot and moves to the next one.
ArrowLeftorArrowRight
Moves between slots.
Backspace
On an empty slot, clears the previous one and moves back.
Delete
Clears the current slot.
Cmd/Ctrl+V
Pastes a code across the slots from the focused one.

Accessibility

  • Slots sit in a labelled role=group, each with an aria-label like Verification code, digit 1 of 6.
  • Helper and error text are linked with aria-describedby; the error uses role=alert and sets aria-invalid.
  • The first slot uses autocomplete one-time-code so browsers can offer SMS codes.

Motion

  • Typed characters rise into the slot and unblur; a paste lands as a short left-to-right wave.
  • One focus ring glides between slots, and a new error nudges the row side to side once.
  • Reduced motion removes the glide, shake, and blur and uses instant fades.

Responsive behavior

  • Slots are 42px wide and can shrink with max-width 100%; below 360px gaps tighten and slots drop to 44px tall.
  • The first slot uses autocomplete one-time-code, so iOS and Android can offer SMS codes.
  • numeric inputMode brings up the number pad on phones.

Performance

  • Only a handful of inputs plus one gliding ring; a ResizeObserver springs the message height.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Use for verification and two-factor codes. Use input or password-field for anything else.
  • It is controlled: keep value in state and submit when value.length equals length. There is no default export, so import it by name.
/components/blocks/otp-input/markdown

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

Related

InputComponentA single line field with clear labels and useful states.Password fieldComponentCapture sensitive text with a visible reveal control.Login and sign up: Email codeBlockA sign in card that morphs from email to a six digit code to your account.Login and sign up: Sign upBlockAn account creation flow with field validation, password strength, and a clear completion state.Security settingsProBlockAn account security page with guided two-factor setup, password change and active sessions.

More like this in Pro

Explore Pro
Multi-step formProBlockA guided form that presents one decision at a time and preserves progress.Onboarding illustrationProBlockA compact onboarding card whose line illustration morphs from folder to files, team, and badge.Two-factor setupProBlockA two-factor setup card where you scan a real, working authenticator QR code, type the 6-digit code into slots that move to the next box on their own, and save your backup codes before it turns on. Every step shares one fixed-size card, so it moves between steps with a short slide and never changes size.
PreviousFile uploadNextMulti-step form
Arc · 122 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
Verification code
4
8
2
Use the six digit code from your email.Use the six digit code from your email.