Modals
Contained focus-managed dialogs
Five practical starting points. Explore a live example, then open its exact document in Studio.
Confirmation dialog
Confirmation dialog demonstrates contained focus-managed dialogs. Edit content, composition and responsive styling in Studio.
Usage code · exact rendered document
'use client';
import type { CSSProperties } from "react";
import { Dialog, ExtendedElement, SigmaUIProvider } from "sigmaui";
import type { TrustedBindings } from "sigmaui";
import "sigmaui/styles.css";
// Supply trusted action callbacks and pricing data from the host application.
// Images retain validated asset URLs. Importing handwritten JSX into Studio is unsupported.
export default function Page({ bindings = {} }: { bindings?: TrustedBindings }) {
return (
<SigmaUIProvider style={{ containerType: "inline-size" }} theme="minimal" mode="light">
<style>{".sigma-export-1sfvxa2-tmmioy-ex-7c19ae3e8277-el-457{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1sfvxa2-tmmioy-ex-7c19ae3e8277-el-457 \u003e *{width:100% !important}\n.sigma-export-1sfvxa2-tmmioy-ex-7c19ae3e8277-el-460{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1sfvxa2-tmmioy-ex-7c19ae3e8277-el-460 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-1sfvxa2-tmmioy-ex-7c19ae3e8277-el-457" data-node="ex-7c19ae3e8277-el-457" style={{"--node-gap":"16px","--node-mobile":1,"--node-padding":"24px","--node-tablet":2} as CSSProperties}>
<Dialog trigger={"Review action"} title={"Confirm a demo action"} description={"A considered space for your next idea."}>
<div className="sigma-node sigma-export-1sfvxa2-tmmioy-ex-7c19ae3e8277-el-460" data-node="ex-7c19ae3e8277-el-460" style={{"--node-mobile":1,"--node-tablet":2} as CSSProperties}>
<ExtendedElement kind={"Text"} props={{"text":"Your bag is empty. Add an item in the local demo."}} />
</div>
</Dialog>
</div>
</div>
</SigmaUIProvider>
);
}
Welcome dialog
Welcome dialog demonstrates contained focus-managed dialogs. Edit content, composition and responsive styling in Studio.
Usage code · exact rendered document
'use client';
import type { CSSProperties } from "react";
import { Dialog, ExtendedElement, SigmaUIProvider } from "sigmaui";
import type { TrustedBindings } from "sigmaui";
import "sigmaui/styles.css";
// Supply trusted action callbacks and pricing data from the host application.
// Images retain validated asset URLs. Importing handwritten JSX into Studio is unsupported.
export default function Page({ bindings = {} }: { bindings?: TrustedBindings }) {
return (
<SigmaUIProvider style={{ containerType: "inline-size" }} theme="minimal" mode="light">
<style>{".sigma-export-1vfhsag-jgw1ky-ex-6f5eddf517b8-el-461{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1vfhsag-jgw1ky-ex-6f5eddf517b8-el-461 \u003e *{width:100% !important}\n.sigma-export-1vfhsag-jgw1ky-ex-6f5eddf517b8-el-464{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1vfhsag-jgw1ky-ex-6f5eddf517b8-el-464 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-1vfhsag-jgw1ky-ex-6f5eddf517b8-el-461" data-node="ex-6f5eddf517b8-el-461" style={{"--node-gap":"16px","--node-mobile":1,"--node-padding":"16px","--node-tablet":2} as CSSProperties}>
<Dialog trigger={"Open welcome"} title={"Welcome to Studio"} description={"Built for small teams doing meaningful work."}>
<div className="sigma-node sigma-export-1vfhsag-jgw1ky-ex-6f5eddf517b8-el-464" data-node="ex-6f5eddf517b8-el-464" style={{"--node-mobile":1,"--node-tablet":2} as CSSProperties}>
<ExtendedElement kind={"Text"} props={{"text":"Projects • People • Settings"}} />
</div>
</Dialog>
</div>
</div>
</SigmaUIProvider>
);
}
Details dialog
Details dialog demonstrates contained focus-managed dialogs. Edit content, composition and responsive styling in Studio.
Usage code · exact rendered document
'use client';
import type { CSSProperties } from "react";
import { Checkbox, Dialog, Select, SigmaUIProvider } from "sigmaui";
import type { TrustedBindings } from "sigmaui";
import "sigmaui/styles.css";
// Supply trusted action callbacks and pricing data from the host application.
// Images retain validated asset URLs. Importing handwritten JSX into Studio is unsupported.
export default function Page({ bindings = {} }: { bindings?: TrustedBindings }) {
return (
<SigmaUIProvider style={{ containerType: "inline-size" }} theme="minimal" mode="light">
<style>{".sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-465{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-465 \u003e *{width:100% !important}\n.sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-468{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-468 \u003e *{width:100% !important}\n.sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-469{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-469 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-465" data-node="ex-efa8ddc3c0e5-el-465" style={{"--node-gap":"16px","--node-mobile":1,"--node-padding":"24px","--node-tablet":2} as CSSProperties}>
<Dialog trigger={"View details"} title={"Project details"} description={"Your workspace, with everything in reach."}>
<div className="sigma-node sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-468" data-node="ex-efa8ddc3c0e5-el-468" style={{"--node-mobile":1,"--node-tablet":2} as CSSProperties}>
<Checkbox label={"In stock only"} defaultChecked={false} disabled={false} />
</div>
<div className="sigma-node sigma-export-76caqf-9d08nn-ex-efa8ddc3c0e5-el-469" data-node="ex-efa8ddc3c0e5-el-469" style={{"--node-mobile":1,"--node-tablet":2} as CSSProperties}>
<Select label={"Price range"} options={["All prices","Under $50","Under $150"]} />
</div>
</Dialog>
</div>
</div>
</SigmaUIProvider>
);
}
Form dialog
Form dialog demonstrates contained focus-managed dialogs. Edit content, composition and responsive styling in Studio.
Usage code · exact rendered document
'use client';
import type { CSSProperties } from "react";
import { Dialog, ExtendedElement, SigmaUIProvider } from "sigmaui";
import type { TrustedBindings } from "sigmaui";
import "sigmaui/styles.css";
// Supply trusted action callbacks and pricing data from the host application.
// Images retain validated asset URLs. Importing handwritten JSX into Studio is unsupported.
export default function Page({ bindings = {} }: { bindings?: TrustedBindings }) {
return (
<SigmaUIProvider style={{ containerType: "inline-size" }} theme="minimal" mode="light">
<style>{".sigma-export-16vpkks-bwsptu-ex-faa43e229b1a-el-470{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-16vpkks-bwsptu-ex-faa43e229b1a-el-470 \u003e *{width:100% !important}\n.sigma-export-16vpkks-bwsptu-ex-faa43e229b1a-el-473{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-16vpkks-bwsptu-ex-faa43e229b1a-el-473 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-16vpkks-bwsptu-ex-faa43e229b1a-el-470" data-node="ex-faa43e229b1a-el-470" style={{"--node-gap":"16px","--node-mobile":1,"--node-padding":"32px","--node-tablet":2} as CSSProperties}>
<Dialog trigger={"Edit profile"} title={"Update your profile"} description={"Clear information. Confident decisions."}>
<div className="sigma-node sigma-export-16vpkks-bwsptu-ex-faa43e229b1a-el-473" data-node="ex-faa43e229b1a-el-473" style={{"--node-mobile":1,"--node-tablet":2} as CSSProperties}>
<ExtendedElement kind={"Form"} props={{"items":["Display name","Email"],"title":"Edit profile"}} />
</div>
</Dialog>
</div>
</div>
</SigmaUIProvider>
);
}
Help dialog
Help dialog demonstrates contained focus-managed dialogs. Edit content, composition and responsive styling in Studio.
Usage code · exact rendered document
'use client';
import type { CSSProperties } from "react";
import { Dialog, ExtendedElement, SigmaUIProvider } from "sigmaui";
import type { TrustedBindings } from "sigmaui";
import "sigmaui/styles.css";
// Supply trusted action callbacks and pricing data from the host application.
// Images retain validated asset URLs. Importing handwritten JSX into Studio is unsupported.
export default function Page({ bindings = {} }: { bindings?: TrustedBindings }) {
return (
<SigmaUIProvider style={{ containerType: "inline-size" }} theme="minimal" mode="light">
<style>{".sigma-export-ot8brc-u7ghoi-ex-716d7279373f-el-474{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-ot8brc-u7ghoi-ex-716d7279373f-el-474 \u003e *{width:100% !important}\n.sigma-export-ot8brc-u7ghoi-ex-716d7279373f-el-477{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-ot8brc-u7ghoi-ex-716d7279373f-el-477 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-ot8brc-u7ghoi-ex-716d7279373f-el-474" data-node="ex-716d7279373f-el-474" style={{"--node-gap":"16px","--node-mobile":1,"--node-padding":"12px","--node-tablet":2} as CSSProperties}>
<Dialog trigger={"Open help"} title={"Need a hand?"} description={"Make room for what matters."}>
<div className="sigma-node sigma-export-ot8brc-u7ghoi-ex-716d7279373f-el-477" data-node="ex-716d7279373f-el-477" style={{"--node-mobile":1,"--node-tablet":2} as CSSProperties}>
<ExtendedElement kind={"Text"} props={{"text":"You're all caught up."}} />
</div>
</Dialog>
</div>
</div>
</SigmaUIProvider>
);
}
Protected properties
binding, id, type, version, role, intent. Trusted host bindings remain protected.
Composition & accessibility
Supports editable children in its default slot. Use meaningful labels and a logical heading hierarchy. Interactive submissions are simulated locally.