Skip to content
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

[BUG] - Input - Label with placement "outside" only presented when placeholder === " " #3058

Open
daniel-aziz opened this issue May 23, 2024 · 5 comments · May be fixed by #3660
Open

[BUG] - Input - Label with placement "outside" only presented when placeholder === " " #3058

daniel-aziz opened this issue May 23, 2024 · 5 comments · May be fixed by #3660
Labels
✨ Type: Enhancement New enhancement on existing codebase

Comments

@daniel-aziz
Copy link

daniel-aziz commented May 23, 2024

NextUI Version

2.3.6

Describe the bug

When using input component i would only like to present the label outside with no place holder. In nextUI there is no option to do so, so if i set labelPlacement="outside" i will have to also set the placeholder=" " to string with spaces.

image

Code:

 <Input 
        type="email"
        label="Email"
        labelPlacement={"outside"} 
       />

image

Code:

   <Input
            type="email"
            label="Email"
            labelPlacement={"outside"}
            placeholder={" "}
          />

Codesandbox

Steps to Reproduce the Bug or Issue

  1. Import Input Component
  2. Set the follwing props type="text" label="Name" labelPlacement={"outside"} placeholder={" "}

Expected behavior

should not force to set up placeholder in order to show label outside

Screenshots or Videos

No response

Operating System Version

MacOS 14.4.1

Browser

Chrome

@ryo-manba
Copy link
Member

Thanks for the issue!
It might be a good idea to add a prop like outside-top to always display at the top, similar to the existing outside-left.

@ryo-manba ryo-manba added the ✨ Type: Enhancement New enhancement on existing codebase label May 26, 2024
@daniel-aziz
Copy link
Author

Thanks for the issue! It might be a good idea to add a prop like outside-top to always display at the top, similar to the existing outside-left.

Thank you for your reply! love NextUI and it would be highly appreciated to add this prop.

@abhinav700
Copy link
Contributor

abhinav700 commented Aug 16, 2024

@ryo-manba @daniel-aziz I have added the outside-top prop and will be making the PR soon.
I have attached the changes.

Can you please telll me if this satisfies your requirements.

Update : I have made the pull request here

image

@abhinav700 abhinav700 linked a pull request Aug 16, 2024 that will close this issue
@daniel-aziz
Copy link
Author

@ryo-manba @daniel-aziz I have added the outside-top prop and will be making the PR soon. I have attached the changes.

Can you please telll me if this satisfies your requirements.

Update : I have made the pull request here

image

Yes, Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Type: Enhancement New enhancement on existing codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants