Window
A container component styled like a macOS window.
Installation
import { Window } from '@smc/darwin-ui';npx shadcn add https://darwin-ui.mandalsuraj.com/registry/window.jsonUsage
import { Window } from '@smc/darwin-ui';
export function Example() { return ( <Window title="My Application" showControls> <p>Window content goes here.</p> </Window> );}Features
- macOS-style title bar
- Optional traffic light controls
- Close button functionality
- Glass-morphism styling
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | - | Window title |
showControls | boolean | true | Show close button |
onClose | () => void | - | Close handler |
children | ReactNode | - | Window content |