How to render/display the overlay? #99
Replies: 1 comment 1 reply
-
Hey, @MattHeslington [I'm responding with the assumption that you're working with Since the <Dialog.Portal>
<Dialog.Overlay />
<DialogPrimitive.Content>
<slot></slot>
</DialogPrimitive.Content>
</Dialog.Portal> Where <script lang="ts">
import { Dialog as DialogPrimitive } from 'bits-ui';
import { fade } from 'svelte/transition';
import { cn } from '$lib/utils.js';
type $$Props = DialogPrimitive.OverlayProps;
let className: $$Props['class'] = undefined;
export let transition: $$Props['transition'] = fade;
export let transitionConfig: $$Props['transitionConfig'] = {
duration: 150
};
export { className as class };
</script>
<DialogPrimitive.Overlay
{transition}
{transitionConfig}
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm ', className)}
{...$$restProps}
/> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
As the title says, how do I give my <Command.Dialog> an overlay? I don't understand the docs. I've checked the bits-ui docs, the shadcn-svelte docs, asked AI and gave it your docs here. I just want to render and style an overlay.
Any help much appreciated.
Cheers,
Matt
Beta Was this translation helpful? Give feedback.
All reactions