Skip to content

How to close a dialog? #1030

Discussion options

You must be logged in to vote

Hi,

Coincidentally I was experimenting with this today and found the same.

It appears that the Dialog does include the ability to close itself without needing to add extra props (such as binding open). It adds a cross icon in the top-right. If you click that, it closes.

However if you compare it to the underlying component on https://www.bits-ui.com/docs/components/dialog that has a <Dialog.Close />. For example you can see its example has::

<Dialog.Close class="inline-flex h-input items-center justify-center rounded-input bg-dark px-[50px] text-[15px] font-semibold text-background shadow-mini hover:bg-dark/95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-dark focus-v…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Thecrafterja
Comment options

@o-az
Comment options

Answer selected by Thecrafterja
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
type: documentation A change or addition to the documentation
4 participants
Converted from issue

This discussion was converted from issue #1029 on April 17, 2024 17:39.