@gfazioli/mantine-window
v0.6.4
Published
A Mantine extension component that renders draggable, resizable floating windows with persistent state, customizable boundaries, collapsible content, and flexible control over position, size, and interaction modes.
Maintainers
Readme
Mantine Window Component
Overview
This component is created on top of the Mantine library.
A fully-featured floating window component for Mantine applications. Provides draggable windows with customizable drag modes (header-only, full-window, or both), 8-directional resizing (top, right, bottom, left, and corners), collapsible content with smooth animations, and persistent state management via localStorage.
Configure initial position, size constraints (min/max width/height), drag boundaries, and control interaction modes (none, vertical, horizontal, or both for resizing). Includes z-index management for multi-window scenarios, close/collapse buttons, and event callbacks for position and size changes. Perfect for building desktop-like interfaces, modals, tool panels, and floating widgets.
👉 You can find more components on the Mantine Extensions Hub library.
Installation
npm install @gfazioli/mantine-windowor
yarn add @gfazioli/mantine-windowAfter installation import package styles at the root of your application:
import '@gfazioli/mantine-window/styles.css';Usage
import { Window } from '@gfazioli/mantine-window';
import { Title } from '@mantine/core';
function Demo() {
return (
<Stack>
<Window title="Hello World" opened>
<Title order={4}>This is a window</Title>
</Window>
</Stack>
);
}https://github.com/user-attachments/assets/7f80b2c0-90b1-442f-82c8-fddb75cca14e
