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

UI issue with inline tags #40

Closed
Codemaine opened this issue May 24, 2024 · 15 comments
Closed

UI issue with inline tags #40

Codemaine opened this issue May 24, 2024 · 15 comments

Comments

@Codemaine
Copy link

I saw you recently implemented the inline tags, and when I tried to implement it in my app, I got this styling issue.
image

@JaleelB
Copy link
Owner

JaleelB commented May 24, 2024

Firstly, make sure you update to version 1.1.1 of the package. Version 1.1.1 corrected a styling issue I noticed. Check your package.json file to very that the version of the package is the latest one

@Codemaine
Copy link
Author

Yea, I've confirmed it's on version 1.1.1

image

@JaleelB
Copy link
Owner

JaleelB commented May 25, 2024

Yea, I've confirmed it's on version 1.1.1

image

OK. Send a reproduction of this error so I can better understand the context of your issue. I tried reproducing it but all instances I created have the correct styling implementation. Preferably a code sandbox or a hosted link so I can observe the dom

@Codemaine
Copy link
Author

It's being used in a big project. Should I share how I used the component and our tailwindcss config file?

@JaleelB
Copy link
Owner

JaleelB commented May 25, 2024

It's being used in a big project. Should I share how I used the component and our tailwindcss config file?

@Codemaine That would be helpful, so yes. I would still like you to recreate the environment outside your project to narrow down whether or not this issue was caused by something in your project. For this you can just create a simple Next.js app in a code sandbox, follow the shadcn setup guide, install and setup the package, then share the link

@Codemaine
Copy link
Author

@JaleelB
Copy link
Owner

JaleelB commented May 26, 2024

Sure. Here's the codesandbox link: https://codesandbox.io/p/devbox/mystifying-khorana-hhc69f?workspaceId=be20086d-945c-402b-ae8c-2b40ca5f7c9a

You aren't using the shadcn css variables in the environment. Make sure you're also using them in your project

@Codemaine
Copy link
Author

I can confirm that I'm using the shadcn css variables in my project.

image

@JaleelB
Copy link
Owner

JaleelB commented May 26, 2024

I can confirm that I'm using the shadcn css variables in my project.

image

@Codemaine Based on your first image, i think i know what the issue is. Do you have a live version of your app using the package? I dont think the min-width and height I included in the fix are being applied to the input in your use case. From what I can see the input is taking on the full width of the container. This is how it should be

Screenshot 2024-05-26 at 12 14 49 PM

@JaleelB
Copy link
Owner

JaleelB commented May 26, 2024

@Codemaine Thanks. You can delete the comment now. I figured out what the issue is. Ypu are applying this min-width of 450px, which overrides the min-width that is set internally. That along with the w-full class causes the input to always be the size of the container so the tags are stacked above it. Remove that min-width and you should be fine. I see you also applying a shadow. If you just want the input to show without that outline also, just do shadow none. If you want to override the min-width, just bear in mind if you make it too large the tags will stack on top and no be inline depending on how big you make the parent container

Screenshot 2024-05-26 at 1 38 48 PM

Repository owner deleted a comment from Codemaine May 26, 2024
@JaleelB
Copy link
Owner

JaleelB commented May 26, 2024

@Codemaine I deleted the comment for you. Just follow what I said and you should be fine. Once that works, just close the issue as done

@Codemaine
Copy link
Author

The min-width was from the demo on the landing page lmao. I removed the min-width and w-full classes, yet i'm still getting the styling issue.

@JaleelB
Copy link
Owner

JaleelB commented May 26, 2024

The min-width was from the demo on the landing page lmao. I removed the min-width and w-full classes, yet i'm still getting the styling issue.

@Codemaine What exactly is the styling issue you're referring to then? I removed the "sm:min-w-[450px]" class from the input you showed and that solved the input not being inline. Is that not what you were referring to?

@JaleelB
Copy link
Owner

JaleelB commented May 27, 2024

Also, update to the latest version of the package

@Codemaine
Copy link
Author

Oh my bad. I thought the inline tags showed horizontally in the input field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants