Skip to content

DialogProps beta ​

Interface of @v12-engine/client/kit

ts
export interface DialogProps

What a Dialog is given: whether it is open, its title, its content and buttons, and how it is placed

Members ​

ark ​

ts
ark?: Partial<Omit<Ark.RootProps, 'children' | 'open'>>;

The rest of Ark's dialog, which it is (closeOnEscape, closeOnInteractOutside, modal...): Ark's own, not the kit's to promise

children ​

ts
children?: JSX.Element;

What the dialog holds, which scrolls if the window is too short

class ​

ts
class?: string;

For its panel

ts
footer?: JSX.Element;

Its buttons, at the bottom. One with data-autofocus has the keyboard first; the last one without

mount ​

ts
mount?: Element;

Where it goes: the place it is in (a game's element), or the page's body, when left out

onClose ​

ts
onClose?: () => void;

It was closed: Escape, a press outside it, a button of its own

open ​

ts
open: boolean;

Shown while it is: with onClose, said from outside

role ​

ts
role?: 'dialog' | 'alertdialog';

What it is to a screen reader: an alertdialog asks for an answer before anything else. dialog when left out

size ​

ts
size?: 'md' | 'lg' | 'xl';

How wide its panel may be: a form's (md, when left out), or a list's (lg)

title ​

ts
title: JSX.Element;

The dialog's heading