Component properties
Props for the DragWindowRegion component
React component for window titlebar
export default function DragWindowRegion({ title }: DragWindowRegionProps) {
return (
<div className="flex w-screen items-stretch justify-between">
<div className="draglayer w-full">
{title && (
<div className="flex flex-1 select-none whitespace-nowrap p-2 text-xs text-gray-400">
{title}
</div>
)}
</div>
<WindowButtons />
</div>
);
}
Custom window titlebar with draggable region and window controls
Creates a complete titlebar for Electron applications with: