Shadcn/ui CommandDialog How can the ui not be vertically centered without changing the original code? #5469
Unanswered
aboutjquery
asked this question in
Q&A
Replies: 1 comment
-
Good question, @aboutjquery! Most CSS solutions have a prop (i.e. It seems that shadcn/ui defaults to vertically centered with no prop available to control vertical positioning, though it could be there and I just can't see it. What you can do is something like this: <DialogContent className="sm:max-w-md fixed top-[15%]">
... But it seems like a prop would be more convenient ( I am admittedly lazy). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using nextjs + shadcn/ui
The current situation is that the keyboard pops up when the
CommandDialog
is opened on the phone, but theCommandDialog
is always centered and blocked by the keyboard. I tried to simply addclassName
orstyle
but failed. It seems that the component does not accept these attributes.I'd like to simply remove something like
top-[50%] data-[state=open]:slide-in-from-top-[48%]
so that it uses properties liketop-0
, how can i do this?Beta Was this translation helpful? Give feedback.
All reactions