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-1gkgvuw-ll8vsy-ex-ca95e172de5f-el-1{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1gkgvuw-ll8vsy-ex-ca95e172de5f-el-1 \u003e *{width:100% !important}\n.sigma-export-1gkgvuw-ll8vsy-ex-ca95e172de5f-el-4{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1gkgvuw-ll8vsy-ex-ca95e172de5f-el-4 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-1gkgvuw-ll8vsy-ex-ca95e172de5f-el-1" data-node="ex-ca95e172de5f-el-1" 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-1gkgvuw-ll8vsy-ex-ca95e172de5f-el-4" data-node="ex-ca95e172de5f-el-4" 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-1u55ohc-hailtu-ex-7941814fee49-el-5{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1u55ohc-hailtu-ex-7941814fee49-el-5 \u003e *{width:100% !important}\n.sigma-export-1u55ohc-hailtu-ex-7941814fee49-el-8{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1u55ohc-hailtu-ex-7941814fee49-el-8 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-1u55ohc-hailtu-ex-7941814fee49-el-5" data-node="ex-7941814fee49-el-5" 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-1u55ohc-hailtu-ex-7941814fee49-el-8" data-node="ex-7941814fee49-el-8" 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-l0an7b-cfysnn-ex-2ccb6d48df3e-el-9{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-l0an7b-cfysnn-ex-2ccb6d48df3e-el-9 \u003e *{width:100% !important}\n.sigma-export-l0an7b-cfysnn-ex-2ccb6d48df3e-el-12{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-l0an7b-cfysnn-ex-2ccb6d48df3e-el-12 \u003e *{width:100% !important}\n.sigma-export-l0an7b-cfysnn-ex-2ccb6d48df3e-el-13{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-l0an7b-cfysnn-ex-2ccb6d48df3e-el-13 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-l0an7b-cfysnn-ex-2ccb6d48df3e-el-9" data-node="ex-2ccb6d48df3e-el-9" 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-l0an7b-cfysnn-ex-2ccb6d48df3e-el-12" data-node="ex-2ccb6d48df3e-el-12" 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-l0an7b-cfysnn-ex-2ccb6d48df3e-el-13" data-node="ex-2ccb6d48df3e-el-13" 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-opv5fo-1c6czr6-ex-bb0df7c80e42-el-14{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-opv5fo-1c6czr6-ex-bb0df7c80e42-el-14 \u003e *{width:100% !important}\n.sigma-export-opv5fo-1c6czr6-ex-bb0df7c80e42-el-17{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-opv5fo-1c6czr6-ex-bb0df7c80e42-el-17 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-opv5fo-1c6czr6-ex-bb0df7c80e42-el-14" data-node="ex-bb0df7c80e42-el-14" 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-opv5fo-1c6czr6-ex-bb0df7c80e42-el-17" data-node="ex-bb0df7c80e42-el-17" 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-1y3evyg-1dc22gy-ex-23e1d2aa5480-el-18{width:100% !important;max-width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1y3evyg-1dc22gy-ex-23e1d2aa5480-el-18 \u003e *{width:100% !important}\n.sigma-export-1y3evyg-1dc22gy-ex-23e1d2aa5480-el-21{width:100% !important;position:relative !important;left:auto !important;top:auto !important}.sigma-export-1y3evyg-1dc22gy-ex-23e1d2aa5480-el-21 \u003e *{width:100% !important}"}</style>
<div className="sigma-stack">
<div className="sigma-node sigma-export-1y3evyg-1dc22gy-ex-23e1d2aa5480-el-18" data-node="ex-23e1d2aa5480-el-18" 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-1y3evyg-1dc22gy-ex-23e1d2aa5480-el-21" data-node="ex-23e1d2aa5480-el-21" 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.