Skip to content

[BUG] - Input-otp variants #5168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PriteshUE opened this issue Apr 9, 2025 · 2 comments · Fixed by #5179
Closed

[BUG] - Input-otp variants #5168

PriteshUE opened this issue Apr 9, 2025 · 2 comments · Fixed by #5179
Assignees
Labels
🎨 Scope : Themes / Styles Related to the themes or styles

Comments

@PriteshUE
Copy link

PriteshUE commented Apr 9, 2025

HeroUI Version

2.7.0

Describe the bug

import {InputOtp} from "@heroui/react";

export default function App() {
  const variants = ["flat", "bordered", "underlined", "faded"];

  return (
    <div className="w-full flex flex-wrap gap-4">
      {variants.map((variant) => (
        <div key={variant}>
          <div className="text-default-500">variant: {variant}</div>
          <InputOtp length={4} variant={variant} />
        </div>
      ))}
    </div>
  );
}

in this inputOtp add a bg-black for background color is black and using this is input otp is not visable because text is black and bg-black

import { InputOtp } from "@heroui/react";

export default function App() {
  const variants = ["flat", "bordered", "underlined", "faded"];

  return (
    <div className="w-full flex flex-wrap gap-4 bg-black">
      {variants.map((variant) => (
        <div key={variant}>
          <div className="text-default-500">variant: {variant}</div>
          <InputOtp length={4} variant={variant} />
        </div>
      ))}
    </div>
  );
}

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. go to
  2. click on otp first
  3. enter any number
  4. number is not visable

Expected behavior

when bg-black then inputOtp field number is white

and on bg-white then inputOtp text-black

Screenshots or Videos

No response

Operating System Version

windows

Browser

Chrome

Copy link

linear bot commented Apr 9, 2025

@PriteshUE
Copy link
Author

bug-heroui_REC.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Scope : Themes / Styles Related to the themes or styles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants