diff --git a/apps/v4/content/docs/components/base/input-group.mdx b/apps/v4/content/docs/components/base/input-group.mdx index 3234106697..505a91057e 100644 --- a/apps/v4/content/docs/components/base/input-group.mdx +++ b/apps/v4/content/docs/components/base/input-group.mdx @@ -293,4 +293,3 @@ All other props are passed through to the underlying `` component. ``` - diff --git a/apps/v4/content/docs/components/base/input-otp.mdx b/apps/v4/content/docs/components/base/input-otp.mdx index c179d96a42..38f8031513 100644 --- a/apps/v4/content/docs/components/base/input-otp.mdx +++ b/apps/v4/content/docs/components/base/input-otp.mdx @@ -7,11 +7,7 @@ links: doc: https://input-otp.rodz.dev --- - + ## About @@ -27,16 +23,10 @@ Input OTP is built on top of [input-otp](https://github.com/guilhermerodz/input- - - -Run the following command: - ```bash npx shadcn@latest add input-otp ``` - - @@ -92,150 +82,66 @@ import { ``` -## Examples - -### Pattern +## Pattern Use the `pattern` prop to define a custom pattern for the OTP input. - - -```tsx showLineNumbers {1,7} +```tsx showLineNumbers {1,5} import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp" -... - - - - - {/* ... */} - +; + ... ``` + + +## Examples + ### Separator -You can use the `` component to add a separator between the input groups. +Use the `` component to add a separator between input groups. - + -```tsx showLineNumbers {4,15} -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/components/ui/input-otp" +### Disabled -... +Use the `disabled` prop to disable the input. - - - - - - - - - - - -``` + ### Controlled -You can use the `value` and `onChange` props to control the input value. +Use the `value` and `onChange` props to control the input value. +### Invalid + +Use `aria-invalid` on the slots to show an error state. + + + +### Four Digits + +A common pattern for PIN codes. This uses the `pattern={REGEXP_ONLY_DIGITS}` prop. + + + +### Alphanumeric + +Use `REGEXP_ONLY_DIGITS_AND_CHARS` to accept both letters and numbers. + + + ### Form - + -## Changelog +## API Reference -### 2024-03-19 Composition - -We've made some updates and replaced the render props pattern with composition. Here's how to update your code if you prefer the composition pattern. - - - **Note:** You are not required to update your code if you are using the - `render` prop. It is still supported. - - - - -Update to the latest version of `input-otp`. - -```bash -npm install input-otp@latest -``` - -Update `input-otp.tsx` - -```diff showLineNumbers title="input-otp.tsx" {2,8-11} -- import { OTPInput, SlotProps } from "input-otp" -+ import { OTPInput, OTPInputContext } from "input-otp" - - const InputOTPSlot = React.forwardRef< - React.ElementRef<"div">, -- SlotProps & React.ComponentPropsWithoutRef<"div"> -- >(({ char, hasFakeCaret, isActive, className, ...props }, ref) => { -+ React.ComponentPropsWithoutRef<"div"> & { index: number } -+ >(({ index, className, ...props }, ref) => { -+ const inputOTPContext = React.useContext(OTPInputContext) -+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] -``` - -Then replace the `render` prop in your code. - -```diff showLineNumbers {2-12} - - - - - - - - - - - - - -``` - - - -### 2024-03-19 Disabled - -To add a disabled state to the input, update `` as follows: - -```tsx showLineNumbers title="input-otp.tsx" {4,7-11} -const InputOTP = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, containerClassName, ...props }, ref) => ( - -)) -InputOTP.displayName = "InputOTP" -``` +See the [input-otp](https://input-otp.rodz.dev) documentation for more information. diff --git a/apps/v4/content/docs/components/radix/input-otp.mdx b/apps/v4/content/docs/components/radix/input-otp.mdx index a7201b048a..67e5a030a8 100644 --- a/apps/v4/content/docs/components/radix/input-otp.mdx +++ b/apps/v4/content/docs/components/radix/input-otp.mdx @@ -7,11 +7,7 @@ links: doc: https://input-otp.rodz.dev --- - + ## About @@ -27,16 +23,10 @@ Input OTP is built on top of [input-otp](https://github.com/guilhermerodz/input- - - -Run the following command: - ```bash npx shadcn@latest add input-otp ``` - - @@ -92,150 +82,66 @@ import { ``` -## Examples - -### Pattern +## Pattern Use the `pattern` prop to define a custom pattern for the OTP input. - - -```tsx showLineNumbers {1,7} +```tsx showLineNumbers {1,5} import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp" -... - - - - - {/* ... */} - +; + ... ``` + + +## Examples + ### Separator -You can use the `` component to add a separator between the input groups. +Use the `` component to add a separator between input groups. - + -```tsx showLineNumbers {4,15} -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/components/ui/input-otp" +### Disabled -... +Use the `disabled` prop to disable the input. - - - - - - - - - - - -``` + ### Controlled -You can use the `value` and `onChange` props to control the input value. +Use the `value` and `onChange` props to control the input value. +### Invalid + +Use `aria-invalid` on the slots to show an error state. + + + +### Four Digits + +A common pattern for PIN codes. This uses the `pattern={REGEXP_ONLY_DIGITS}` prop. + + + +### Alphanumeric + +Use `REGEXP_ONLY_DIGITS_AND_CHARS` to accept both letters and numbers. + + + ### Form - + -## Changelog +## API Reference -### 2024-03-19 Composition - -We've made some updates and replaced the render props pattern with composition. Here's how to update your code if you prefer the composition pattern. - - - **Note:** You are not required to update your code if you are using the - `render` prop. It is still supported. - - - - -Update to the latest version of `input-otp`. - -```bash -npm install input-otp@latest -``` - -Update `input-otp.tsx` - -```diff showLineNumbers title="input-otp.tsx" {2,8-11} -- import { OTPInput, SlotProps } from "input-otp" -+ import { OTPInput, OTPInputContext } from "input-otp" - - const InputOTPSlot = React.forwardRef< - React.ElementRef<"div">, -- SlotProps & React.ComponentPropsWithoutRef<"div"> -- >(({ char, hasFakeCaret, isActive, className, ...props }, ref) => { -+ React.ComponentPropsWithoutRef<"div"> & { index: number } -+ >(({ index, className, ...props }, ref) => { -+ const inputOTPContext = React.useContext(OTPInputContext) -+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] -``` - -Then replace the `render` prop in your code. - -```diff showLineNumbers {2-12} - - - - - - - - - - - - - -``` - - - -### 2024-03-19 Disabled - -To add a disabled state to the input, update `` as follows: - -```tsx showLineNumbers title="input-otp.tsx" {4,7-11} -const InputOTP = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, containerClassName, ...props }, ref) => ( - -)) -InputOTP.displayName = "InputOTP" -``` +See the [input-otp](https://input-otp.rodz.dev) documentation for more information. diff --git a/apps/v4/examples/__index__.tsx b/apps/v4/examples/__index__.tsx index 643bd3a36d..99a5aab7bd 100644 --- a/apps/v4/examples/__index__.tsx +++ b/apps/v4/examples/__index__.tsx @@ -2930,19 +2930,6 @@ export const ExamplesIndex: Record> = { return { default: mod.default || mod[exportName] } }), }, - "input-otp-fields": { - name: "input-otp-fields", - filePath: "examples/radix/input-otp-fields.tsx", - component: React.lazy(async () => { - const mod = await import("./radix/input-otp-fields") - const exportName = - Object.keys(mod).find( - (key) => - typeof mod[key] === "function" || typeof mod[key] === "object" - ) || "input-otp-fields" - return { default: mod.default || mod[exportName] } - }), - }, "input-otp-form": { name: "input-otp-form", filePath: "examples/radix/input-otp-form.tsx", @@ -3008,32 +2995,6 @@ export const ExamplesIndex: Record> = { return { default: mod.default || mod[exportName] } }), }, - "input-otp-simple": { - name: "input-otp-simple", - filePath: "examples/radix/input-otp-simple.tsx", - component: React.lazy(async () => { - const mod = await import("./radix/input-otp-simple") - const exportName = - Object.keys(mod).find( - (key) => - typeof mod[key] === "function" || typeof mod[key] === "object" - ) || "input-otp-simple" - return { default: mod.default || mod[exportName] } - }), - }, - "input-otp-with-separator": { - name: "input-otp-with-separator", - filePath: "examples/radix/input-otp-with-separator.tsx", - component: React.lazy(async () => { - const mod = await import("./radix/input-otp-with-separator") - const exportName = - Object.keys(mod).find( - (key) => - typeof mod[key] === "function" || typeof mod[key] === "object" - ) || "input-otp-with-separator" - return { default: mod.default || mod[exportName] } - }), - }, "input-required": { name: "input-required", filePath: "examples/radix/input-required.tsx", @@ -9304,19 +9265,6 @@ export const ExamplesIndex: Record> = { return { default: mod.default || mod[exportName] } }), }, - "input-otp-fields": { - name: "input-otp-fields", - filePath: "examples/base/input-otp-fields.tsx", - component: React.lazy(async () => { - const mod = await import("./base/input-otp-fields") - const exportName = - Object.keys(mod).find( - (key) => - typeof mod[key] === "function" || typeof mod[key] === "object" - ) || "input-otp-fields" - return { default: mod.default || mod[exportName] } - }), - }, "input-otp-form": { name: "input-otp-form", filePath: "examples/base/input-otp-form.tsx", @@ -9382,32 +9330,6 @@ export const ExamplesIndex: Record> = { return { default: mod.default || mod[exportName] } }), }, - "input-otp-simple": { - name: "input-otp-simple", - filePath: "examples/base/input-otp-simple.tsx", - component: React.lazy(async () => { - const mod = await import("./base/input-otp-simple") - const exportName = - Object.keys(mod).find( - (key) => - typeof mod[key] === "function" || typeof mod[key] === "object" - ) || "input-otp-simple" - return { default: mod.default || mod[exportName] } - }), - }, - "input-otp-with-separator": { - name: "input-otp-with-separator", - filePath: "examples/base/input-otp-with-separator.tsx", - component: React.lazy(async () => { - const mod = await import("./base/input-otp-with-separator") - const exportName = - Object.keys(mod).find( - (key) => - typeof mod[key] === "function" || typeof mod[key] === "object" - ) || "input-otp-with-separator" - return { default: mod.default || mod[exportName] } - }), - }, "input-required": { name: "input-required", filePath: "examples/base/input-required.tsx", diff --git a/apps/v4/examples/base/input-otp-alphanumeric.tsx b/apps/v4/examples/base/input-otp-alphanumeric.tsx index 3f67a2c25d..3a3122d613 100644 --- a/apps/v4/examples/base/input-otp-alphanumeric.tsx +++ b/apps/v4/examples/base/input-otp-alphanumeric.tsx @@ -1,4 +1,5 @@ -import { Field, FieldDescription, FieldLabel } from "@/examples/base/ui/field" +"use client" + import { InputOTP, InputOTPGroup, @@ -9,26 +10,18 @@ import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp" export function InputOTPAlphanumeric() { return ( - - Alphanumeric - Accepts both letters and numbers. - - - - - - - - - - - - - - + + + + + + + + + + + + + ) } diff --git a/apps/v4/examples/base/input-otp-demo.tsx b/apps/v4/examples/base/input-otp-demo.tsx index 304d67964b..359e4605a9 100644 --- a/apps/v4/examples/base/input-otp-demo.tsx +++ b/apps/v4/examples/base/input-otp-demo.tsx @@ -1,20 +1,16 @@ import { InputOTP, InputOTPGroup, - InputOTPSeparator, InputOTPSlot, } from "@/examples/base/ui/input-otp" -export default function InputOTPDemo() { +export function InputOTPDemo() { return ( - + - - - diff --git a/apps/v4/examples/base/input-otp-disabled.tsx b/apps/v4/examples/base/input-otp-disabled.tsx index aff63b4d07..b5ebd8f58e 100644 --- a/apps/v4/examples/base/input-otp-disabled.tsx +++ b/apps/v4/examples/base/input-otp-disabled.tsx @@ -8,21 +8,18 @@ import { export function InputOTPDisabled() { return ( - - Disabled - - - - - - - - - - - - - - + + + + + + + + + + + + + ) } diff --git a/apps/v4/examples/base/input-otp-fields.tsx b/apps/v4/examples/base/input-otp-fields.tsx deleted file mode 100644 index 733e351376..0000000000 --- a/apps/v4/examples/base/input-otp-fields.tsx +++ /dev/null @@ -1,135 +0,0 @@ -"use client" - -import * as React from "react" -import { useState } from "react" -import { - Field, - FieldDescription, - FieldGroup, - FieldLabel, -} from "@/examples/base/ui/field" -import { Input } from "@/examples/base/ui/input" -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/examples/base/ui/input-otp" -import { REGEXP_ONLY_DIGITS } from "input-otp" - -export function InputOTPFields() { - const [value, setValue] = useState("") - const [pinValue, setPinValue] = useState("") - - return ( - - - Verification Code - - - - - - - - - - - - - Enter OTP - - - - - - - - - - - - Enter the 6-digit code sent to your email. - - - - - Two-Factor Authentication - - - - - - - - - - - - - - - - Enter the code from your authenticator app. - - - - PIN Code - - - - - - - - - - Enter your 4-digit PIN (numbers only). - - - - Invalid OTP - - - - - - - - - - - - This OTP field contains validation errors. - - - - Disabled OTP - - - - - - - - - - - - This OTP field is currently disabled. - - - - ) -} diff --git a/apps/v4/examples/base/input-otp-form.tsx b/apps/v4/examples/base/input-otp-form.tsx index 796c740be3..bf690f4cd2 100644 --- a/apps/v4/examples/base/input-otp-form.tsx +++ b/apps/v4/examples/base/input-otp-form.tsx @@ -27,49 +27,49 @@ export function InputOTPForm() { - - - - - Verification code - - - - Resend Code - - - - - - - - - - - - - - - - - I no longer have access to this email address. - - - + + + + Verification code + + + + Resend Code + + + + + + + + + + + + + + + + + I no longer have access to this email address. + + - - - Verify - - - Having trouble signing in?{" "} - - Contact support - - + + + + Verify + + + Having trouble signing in?{" "} + + Contact support + + + ) diff --git a/apps/v4/examples/base/input-otp-four-digits.tsx b/apps/v4/examples/base/input-otp-four-digits.tsx index 779b644999..fe691a473b 100644 --- a/apps/v4/examples/base/input-otp-four-digits.tsx +++ b/apps/v4/examples/base/input-otp-four-digits.tsx @@ -1,4 +1,5 @@ -import { Field, FieldDescription, FieldLabel } from "@/examples/base/ui/field" +"use client" + import { InputOTP, InputOTPGroup, @@ -8,17 +9,13 @@ import { REGEXP_ONLY_DIGITS } from "input-otp" export function InputOTPFourDigits() { return ( - - 4 Digits - Common pattern for PIN codes. - - - - - - - - - + + + + + + + + ) } diff --git a/apps/v4/examples/base/input-otp-invalid.tsx b/apps/v4/examples/base/input-otp-invalid.tsx index aef01b9101..bed716eda3 100644 --- a/apps/v4/examples/base/input-otp-invalid.tsx +++ b/apps/v4/examples/base/input-otp-invalid.tsx @@ -1,12 +1,6 @@ "use client" import * as React from "react" -import { - Field, - FieldDescription, - FieldError, - FieldLabel, -} from "@/examples/base/ui/field" import { InputOTP, InputOTPGroup, @@ -18,28 +12,21 @@ export function InputOTPInvalid() { const [value, setValue] = React.useState("000000") return ( - - Invalid State - - Example showing the invalid error state. - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ) } diff --git a/apps/v4/examples/base/input-otp-pattern.tsx b/apps/v4/examples/base/input-otp-pattern.tsx index 177633da59..f22f719ad9 100644 --- a/apps/v4/examples/base/input-otp-pattern.tsx +++ b/apps/v4/examples/base/input-otp-pattern.tsx @@ -10,7 +10,7 @@ import { REGEXP_ONLY_DIGITS } from "input-otp" export function InputOTPPattern() { return ( - + Digits Only diff --git a/apps/v4/examples/base/input-otp-simple.tsx b/apps/v4/examples/base/input-otp-simple.tsx deleted file mode 100644 index 6391a22639..0000000000 --- a/apps/v4/examples/base/input-otp-simple.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Field, FieldLabel } from "@/examples/base/ui/field" -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/examples/base/ui/input-otp" - -export function InputOTPSimple() { - return ( - - Simple - - - - - - - - - - - - - - - ) -} diff --git a/apps/v4/examples/base/input-otp-with-separator.tsx b/apps/v4/examples/base/input-otp-with-separator.tsx deleted file mode 100644 index 3fda38eacc..0000000000 --- a/apps/v4/examples/base/input-otp-with-separator.tsx +++ /dev/null @@ -1,41 +0,0 @@ -"use client" - -import * as React from "react" -import { Field, FieldLabel } from "@/examples/base/ui/field" -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/examples/base/ui/input-otp" - -export function InputOTPWithSeparator() { - const [value, setValue] = React.useState("123456") - - return ( - - With Separator - - - - - - - - - - - - - - - - - - ) -} diff --git a/apps/v4/examples/radix/input-otp-alphanumeric.tsx b/apps/v4/examples/radix/input-otp-alphanumeric.tsx index 277a597fbc..3d5fdc1c26 100644 --- a/apps/v4/examples/radix/input-otp-alphanumeric.tsx +++ b/apps/v4/examples/radix/input-otp-alphanumeric.tsx @@ -1,4 +1,5 @@ -import { Field, FieldDescription, FieldLabel } from "@/examples/radix/ui/field" +"use client" + import { InputOTP, InputOTPGroup, @@ -9,26 +10,18 @@ import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp" export function InputOTPAlphanumeric() { return ( - - Alphanumeric - Accepts both letters and numbers. - - - - - - - - - - - - - - + + + + + + + + + + + + + ) } diff --git a/apps/v4/examples/radix/input-otp-demo.tsx b/apps/v4/examples/radix/input-otp-demo.tsx index dfaa902d01..9da7e73e39 100644 --- a/apps/v4/examples/radix/input-otp-demo.tsx +++ b/apps/v4/examples/radix/input-otp-demo.tsx @@ -1,20 +1,16 @@ import { InputOTP, InputOTPGroup, - InputOTPSeparator, InputOTPSlot, } from "@/examples/radix/ui/input-otp" -export default function InputOTPDemo() { +export function InputOTPDemo() { return ( - + - - - diff --git a/apps/v4/examples/radix/input-otp-disabled.tsx b/apps/v4/examples/radix/input-otp-disabled.tsx index 89fb081905..72d2615937 100644 --- a/apps/v4/examples/radix/input-otp-disabled.tsx +++ b/apps/v4/examples/radix/input-otp-disabled.tsx @@ -1,4 +1,3 @@ -import { Field, FieldLabel } from "@/examples/radix/ui/field" import { InputOTP, InputOTPGroup, @@ -8,21 +7,18 @@ import { export function InputOTPDisabled() { return ( - - Disabled - - - - - - - - - - - - - - + + + + + + + + + + + + + ) } diff --git a/apps/v4/examples/radix/input-otp-fields.tsx b/apps/v4/examples/radix/input-otp-fields.tsx deleted file mode 100644 index c16bb51b9a..0000000000 --- a/apps/v4/examples/radix/input-otp-fields.tsx +++ /dev/null @@ -1,135 +0,0 @@ -"use client" - -import * as React from "react" -import { useState } from "react" -import { - Field, - FieldDescription, - FieldGroup, - FieldLabel, -} from "@/examples/radix/ui/field" -import { Input } from "@/examples/radix/ui/input" -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/examples/radix/ui/input-otp" -import { REGEXP_ONLY_DIGITS } from "input-otp" - -export function InputOTPFields() { - const [value, setValue] = useState("") - const [pinValue, setPinValue] = useState("") - - return ( - - - Verification Code - - - - - - - - - - - - - Enter OTP - - - - - - - - - - - - Enter the 6-digit code sent to your email. - - - - - Two-Factor Authentication - - - - - - - - - - - - - - - - Enter the code from your authenticator app. - - - - PIN Code - - - - - - - - - - Enter your 4-digit PIN (numbers only). - - - - Invalid OTP - - - - - - - - - - - - This OTP field contains validation errors. - - - - Disabled OTP - - - - - - - - - - - - This OTP field is currently disabled. - - - - ) -} diff --git a/apps/v4/examples/radix/input-otp-form.tsx b/apps/v4/examples/radix/input-otp-form.tsx index 117f9c92fd..5eee5fc34e 100644 --- a/apps/v4/examples/radix/input-otp-form.tsx +++ b/apps/v4/examples/radix/input-otp-form.tsx @@ -27,49 +27,49 @@ export function InputOTPForm() { - - - - - Verification code - - - - Resend Code - - - - - - - - - - - - - - - - - I no longer have access to this email address. - - - + + + + Verification code + + + + Resend Code + + + + + + + + + + + + + + + + + I no longer have access to this email address. + + - - - Verify - - - Having trouble signing in?{" "} - - Contact support - - + + + + Verify + + + Having trouble signing in?{" "} + + Contact support + + + ) diff --git a/apps/v4/examples/radix/input-otp-four-digits.tsx b/apps/v4/examples/radix/input-otp-four-digits.tsx index 5841041985..95e9efb36c 100644 --- a/apps/v4/examples/radix/input-otp-four-digits.tsx +++ b/apps/v4/examples/radix/input-otp-four-digits.tsx @@ -1,4 +1,5 @@ -import { Field, FieldDescription, FieldLabel } from "@/examples/radix/ui/field" +"use client" + import { InputOTP, InputOTPGroup, @@ -8,17 +9,13 @@ import { REGEXP_ONLY_DIGITS } from "input-otp" export function InputOTPFourDigits() { return ( - - 4 Digits - Common pattern for PIN codes. - - - - - - - - - + + + + + + + + ) } diff --git a/apps/v4/examples/radix/input-otp-invalid.tsx b/apps/v4/examples/radix/input-otp-invalid.tsx index 63d3c69507..7fbdcef208 100644 --- a/apps/v4/examples/radix/input-otp-invalid.tsx +++ b/apps/v4/examples/radix/input-otp-invalid.tsx @@ -1,12 +1,6 @@ "use client" import * as React from "react" -import { - Field, - FieldDescription, - FieldError, - FieldLabel, -} from "@/examples/radix/ui/field" import { InputOTP, InputOTPGroup, @@ -18,28 +12,21 @@ export function InputOTPInvalid() { const [value, setValue] = React.useState("000000") return ( - - Invalid State - - Example showing the invalid error state. - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ) } diff --git a/apps/v4/examples/radix/input-otp-pattern.tsx b/apps/v4/examples/radix/input-otp-pattern.tsx index ea27bef8dc..a45e0151d3 100644 --- a/apps/v4/examples/radix/input-otp-pattern.tsx +++ b/apps/v4/examples/radix/input-otp-pattern.tsx @@ -10,7 +10,7 @@ import { REGEXP_ONLY_DIGITS } from "input-otp" export function InputOTPPattern() { return ( - + Digits Only diff --git a/apps/v4/examples/radix/input-otp-simple.tsx b/apps/v4/examples/radix/input-otp-simple.tsx deleted file mode 100644 index c065504953..0000000000 --- a/apps/v4/examples/radix/input-otp-simple.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Field, FieldLabel } from "@/examples/radix/ui/field" -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/examples/radix/ui/input-otp" - -export function InputOTPSimple() { - return ( - - Simple - - - - - - - - - - - - - - - ) -} diff --git a/apps/v4/examples/radix/input-otp-with-separator.tsx b/apps/v4/examples/radix/input-otp-with-separator.tsx deleted file mode 100644 index 96785b5c0a..0000000000 --- a/apps/v4/examples/radix/input-otp-with-separator.tsx +++ /dev/null @@ -1,41 +0,0 @@ -"use client" - -import * as React from "react" -import { Field, FieldLabel } from "@/examples/radix/ui/field" -import { - InputOTP, - InputOTPGroup, - InputOTPSeparator, - InputOTPSlot, -} from "@/examples/radix/ui/input-otp" - -export function InputOTPWithSeparator() { - const [value, setValue] = React.useState("123456") - - return ( - - With Separator - - - - - - - - - - - - - - - - - - ) -}