Dialog shadcn not showing up as a dialog but just as content

It seems like tailwind classes are not resolved in the dialog This is my div
<div className="flex gap-4">
<Link href="/tasks" className={buttonVariants({ size: "sm" })}>
Your tasks
</Link>

<Dialog>
<DialogTrigger asChild>
<Button size="sm" onClick={() => { }}>
Create list
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
</DialogDescription>
</DialogHeader>
</DialogContent>
</Dialog>
</div>
<div className="flex gap-4">
<Link href="/tasks" className={buttonVariants({ size: "sm" })}>
Your tasks
</Link>

<Dialog>
<DialogTrigger asChild>
<Button size="sm" onClick={() => { }}>
Create list
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
</DialogDescription>
</DialogHeader>
</DialogContent>
</Dialog>
</div>
and it's inside this layout
return (
<div className="flex h-full">
<Sidebar />
{children}
</div>
);
return (
<div className="flex h-full">
<Sidebar />
{children}
</div>
);
in the image it shows before clicking on "Create list" and after
No description
No description
5 Replies
Henil Shah
Henil Shah3w ago
I tried running this and it worked for me, can you give more info / reproducing steps? I would suggest to inspect the styles on the browser (I'm sure you might have done this already)
muadpn
muadpn3w ago
Did you use cli?
Henil Shah
Henil Shah3w ago
Yep
Giuliopime
Giuliopime3w ago
GitHub
[bug]: Dialog are AlertDialog do not get properly styled · Issue #4...
Describe the bug I can't get the style to be applied to my alert dialog and dialog, while other components like buttons are styled just fine. Additionally, this is happening on a page, while th...
Henil Shah
Henil Shah3w ago
TLDR: Worked for me, can you pull up a sandbox? Sorry dude, Unfortunately, It's working for me. Maybe you can pump up a sandbox for this?? Although I have some thoughts on the issue you submitted which I'm putting here and not on github to NOT pollute the repo. Positive Remarks: 1. Awesome screenshots (makes me understand the problem in seconds) 2. Good thing to add DOM from the browser tools. Constructive Remarks: 1. Folder structure screenshot is unnecessarily long. (Maybe draw the structure on https://excalidraw.com and just add the important things) 2. my page.tsx is not a good way to show up some code since every page is named page.tsx in Next.js (Just a nitpick) -> Just add the path to the file? 3. In the end of JSX (page.tsx) you're mapping through some "data" array which you haven't given along with the IxListCard component. I mean why give me errors when I'm trying to help you? The Problem is about shad components, just talk about them right?
4. Try AVOIDING creating an issue on any repo if your answer to the question How to reproduce? is this: -> It's weird 'cause I can't always reproduce it, but I can't find the issue in my case 5. As I said before, a sandbox would've been wonderful here. With all that said, I'm no expert on git Issues and PR management. Apparently Theo was live today and addressed this exact problem about how to approach open source repos and issues / prs on it. References: 1. https://www.youtube.com/watch?v=5nY_cy8zcO4 2. https://www.youtube.com/watch?v=JF8F7uaGfV8 I really want to help and I did spin up 2 separate instances of Next apps to reproduce this but couldn't. Let me know how I can assist.!
Excalidraw
Excalidraw — Collaborative whiteboarding made easy
Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them.
Theo - t3․gg
YouTube
Don't Contribute to Open Source
You heard me right. I don't think you should contribute to open source. Unless... KEYWORDS: GITHUB OPEN SOURCE CODING DEVELOPING PROGRAMMING LEARNING TO CODE FIRST CONTRIBUTION PULL REQUEST Check out my Twitch, Twitter, Discord more at https://t3.gg S/O Ph4se0n3 for the awesome edit 🙏
Chris Titus Tech
YouTube
You NEED to Contribute to Open Source
This video explains how to contribute to open source and what normal users should do or new developers should do when contributing. The @t3dotgg https://www.youtube.com/watch?v=5nY_cy8zcO4 ►► Digital Downloads ➜ https://www.cttstore.com ►► Reddit ➜ https://www.reddit.com/r/ChrisTitusTech/ ►► Titus Tech Talk ➜ https://www.youtube.com/c/TitusTe...