docs/components/navigation/Dialog

Dialog

Modal dialog built on @kobalte/core.

import { Dialog } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
open *booleanWhether the dialog is open.
onOpenChange *(open: boolean) => voidCallback fired when dialog open state changes.
title *stringDialog title displayed in the header.
descriptionstringOptional description text displayed below the title.
children *JSX.ElementDialog content to display in the body.
classstringAdditional CSS class name for the dialog content.
unstyledbooleanfalseDisable default styling and apply only custom classes.

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-bg-primary
  • --sk-border
  • --sk-duration-fast
  • --sk-font-size-base
  • --sk-font-size-xl
  • --sk-icon-md
  • --sk-radius-lg
  • --sk-radius-sm
  • --sk-shadow-2xl
  • --sk-space-lg
  • --sk-space-md
  • --sk-space-xs
  • --sk-text-muted
  • --sk-text-primary
  • --sk-text-secondary
  • --sk-z-modal