Tile UI · SolidJS

CSR · SSR · SSG

Dialog

Accessible SolidJS dialog primitives with controlled and uncontrolled state.

import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '@tile-ui/solid';

export default function DialogDemo() {
	return (
		<Dialog>
			<DialogTrigger class="component-preview__action">Open Solid dialog</DialogTrigger>

Use Dialog for accessible SolidJS modal interactions with focus management.

Registry install

pnpm dlx shadcn@latest add @tile-ui/dialog

Package usage

import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Button } from '@tile-ui/solid';

<Dialog>
	<DialogTrigger>Open</DialogTrigger>
	<DialogContent>
		<DialogHeader>
			<DialogTitle>Edit profile</DialogTitle>
			<DialogDescription>Make changes to your profile.</DialogDescription>
		</DialogHeader>
		<DialogFooter>
			<Button>Save</Button>
		</DialogFooter>
	</DialogContent>
</Dialog>

Highlights

  • Trigger, overlay, and content
  • Header, footer, title, and description
  • Close button

Registry dependencies

Item Purpose
dialog Component source and module styles
core Framework-agnostic logic helpers
utils Shared utility helpers
button Registry component dependency
styles Shared SCSS tokens and globals

API reference

Dialog

Prop Type Default
open boolean
defaultOpen boolean
onOpenChange (open: boolean) => void
children JSX.Element

DialogTrigger

No custom props.

DialogClose

No custom props.

DialogOverlay

No custom props.

DialogContent

Prop Type Default
showCloseButton boolean
container Node
overlayClass string
id string

DialogHeader

No custom props.

DialogFooter

Prop Type Default
showCloseButton boolean

DialogTitle

No custom props.

DialogDescription

No custom props.