Coder Social home page Coder Social logo

Comments (15)

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

Codemaine avatar Codemaine commented on August 28, 2024

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

image

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

Codemaine avatar Codemaine commented on August 28, 2024

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

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

Codemaine avatar Codemaine commented on August 28, 2024

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

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

Codemaine avatar Codemaine commented on August 28, 2024

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

image

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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

from shadcn-tag-input.

Codemaine avatar Codemaine commented on August 28, 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.

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 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?

from shadcn-tag-input.

JaleelB avatar JaleelB commented on August 28, 2024

Also, update to the latest version of the package

from shadcn-tag-input.

Codemaine avatar Codemaine commented on August 28, 2024

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

from shadcn-tag-input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.