DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.7K
Sign inGet All-Access
  1. Components
  2. Input Otp
  3. Input Otp Digits Only
MarkdownShare

Shadcn Input Otp Digits Only

OTP input with numeric digits. Built by composing Field, Input Otp. Uses input-otp alongside the shadcn primitives. A free, open source shadcn input otp example you can install with npx shadcn@latest add @reui/c-input-otp-2 and edit as your own code.

OTP input with numeric digits.

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.

Best for: One unbroken row of 6 slots that refuses anything but digits

When to use

  • Login and email verification codes, typed or pasted one character per slot
  • Numeric PINs and digit only codes that ignore any letter typed into them
  • Fixed length codes of letters and numbers, split into groups by separators

When not to use

  • A short PIN of 4 digits with a hint line under its label: use the Input Otp PIN Code example
  • A complete sign-in page with password, social buttons and a brand layout: use the Auth blocks
  • A mobile number with its country dial code, entered before any code is sent: use the Phone Input component
  • Open ended text of any length, such as a name, an email address or a password: use the Input component

Agent notes

  • REGEXP_ONLY_DIGITS drops a pasted code whole when a space or dash sits inside it; strip them with the pasteTransformer prop
  • A wrong code turns red only from aria-invalid on each InputOTPSlot; set on InputOTP it reaches the hidden input and the slots stay plain
  • Read the code from onChange on InputOTP and check it once it reaches maxLength; no example sends or verifies it

Third-party API docs

  • input-otp v1: API reference, docs
Markdownhttps://reui.io/components/input-otp/c-input-otp-2.md
MCPget_example("c-input-otp-2")
Installnpx shadcn@latest add @reui/c-input-otp-2
Full index for agents:llms.txtReUI MCP setup

Shadcn Components in Input Otp Digits Only

  • Field
  • Input Otp

Dependencies

  • input-otp

About Shadcn Input Otp Digits Only

OTP input with numeric digits. Built by composing Field, Input Otp. Uses input-otp alongside the shadcn primitives. A free, open source shadcn input otp example you can install with npx shadcn@latest add @reui/c-input-otp-2 and edit as your own code.

What You Can Build With Shadcn Input Otp Digits Only

  • Composes Field, Input Otp, so it drops into any project already using those components.
  • Install it with the shadcn CLI: npx shadcn@latest add @reui/c-input-otp-2
  • Open source and free, with the full source on this page to copy or adapt.

More Shadcn Input Otp Examples

  • Basic Basic OTP input.
  • Multiple Separators OTP input with multiple separators.
  • Letters & Numbers OTP input with letters and numbers.
  • PIN Code OTP input for PIN codes.
  • Verification Card OTP input verification code.

Related Shadcn Component Categories

  • Item

    Open-source shadcn item row components for list rows, settings items, and action rows.

  • Kanban

    Open-source shadcn kanban components for task boards, workflow pipelines, and drag-and-drop planning.

  • Kbd

    Open-source shadcn keyboard shortcut components for hotkey hints, command docs, and shortcut legends.

  • Label

    Open-source shadcn label components for form labels, accessible inputs, and field pairing.

  • Marker

    Open-source shadcn marker components for agent run logs, inline status lines, and labeled separators.

  • Menubar

    Open-source shadcn menubar components for desktop navigation, editor menus, and app commands.

Frequently Asked Questions

When should I use Shadcn Input Otp Digits Only?

Use it for one unbroken row of 6 slots that refuses anything but digits.

Shadcn Input Otp as a whole fits:

  • Login and email verification codes, typed or pasted one character per slot
  • Numeric PINs and digit only codes that ignore any letter typed into them
  • Fixed length codes of letters and numbers, split into groups by separators

For a short PIN of 4 digits with a hint line under its label, use the Input Otp PIN Code example. For a complete sign-in page with password, social buttons and a brand layout, use the Auth blocks. For a mobile number with its country dial code, entered before any code is sent, use the Phone Input component. For open ended text of any length, such as a name, an email address or a password, use the Input component.

How do I install Shadcn Input Otp Digits Only?

Run npx shadcn@latest add @reui/c-input-otp-2. The CLI copies the source into your project, so you own the code and can edit it freely.

Is Shadcn Input Otp Digits Only free to use?

Yes. Every ReUI component example is open source and free for personal and commercial projects.

Which components does Shadcn Input Otp Digits Only use?

It composes Field, Input Otp. The shadcn CLI installs those alongside the example.
PreviousBasicNextMultiple Separators

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App ShellAdded 4 new App Shell blocks
  • Auth
  • Card
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • Base
  • AdvancedNew Advanced category with 3 Data Grid blocks
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area Chart
  • Bar Chart
  • Composed Chart
  • Line Chart
  • Pie Chart
  • Radial Chart
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.7K