Efferd

Dialog

Buttons 46

About

a beautifully structured Dialog component built using Radix UI primitives with custom styling and slots for full flexibility. It offers smooth animations, a blurred backdrop, responsive sizing, and optional close buttons—making it ideal for modals, alerts, or form popups in any modern React app.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dialog to your project and fits it to your theme.

Code

How Dialog is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import {
	Dialog,
	DialogBody,
	DialogClose,
	DialogContent,
	DialogDescription,
	DialogFooter,
	DialogHeader,
	DialogTitle,
	DialogTrigger,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';

export default function StickyHeaderFooter() {
	return (
		<Dialog modal>
			<DialogTrigger asChild>
				<Button variant="outline">Sticky Header & Footer</Button>
			</DialogTrigger>
			<DialogContent className="flex max-h-[80vh] flex-col">
				<DialogHeader className="shrink-0">
					<DialogTitle>Sticky Header & Footer</DialogTitle>
					<DialogDescription>
						Both header and footer are always visible.
					</DialogDescription>
				</DialogHeader>
				<DialogBody className="flex-1 space-y-5 overflow-y-auto">
					{Array.from({ length: 20 }).map((_, i) => (
						<div key={i}>
							<h3 className="text-base font-semibold">Heading {i + 1}</h3>
							<p className="text-muted-foreground text-sm">
								Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
								nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed
								nisi. Nulla quis sem at nibh elementum imperdiet.
							</p>
						</div>
					))}
				</DialogBody>

				<DialogFooter className="shrink-0">
					<DialogClose asChild>
						<Button variant="outline">Close</Button>
					</DialogClose>
					<Button>Save Changes</Button>
				</DialogFooter>
			</DialogContent>
		</Dialog>
	);
}

Dependencies

More by Efferd

View all
  • Testimonials Columns

    Testimonials Columns

    7.1K
  • Zoom Parallax

    Zoom Parallax

    5.2K
  • Dotted Surface

    Dotted Surface

    3.5K
  • Footer Section

    Footer Section

    2.7K
  • Grid Feature Cards

    Grid Feature Cards

    1.9K
  • Logo Cloud 2

    Logo Cloud 2

    1.7K
  • Header 3

    Header 3

    1.6K
  • Logo Cloud 3

    Logo Cloud 3

    1.5K

More in Buttons

View all
  • Texture Button

    Texture Button

    93
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    39
  • Base Button

    Base Button

    1
  • App Store Button

    App Store Button

    456
  • Button Group

    Button Group

    4
  • Button

    Button

    65
  • Button

    Button

    1