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.
npm install @gfazioli/mantine-window
---
❤️ If this component has been useful to you or your team, please consider becoming a sponsor
This component is created on top of the Mantine library.
Mantine Window is a versatile UI container that brings a familiar desktop‑like window experience to React applications built with Mantine.
You can render windows in a portal for fixed, scroll‑independent overlays, or constrain them to a specific parent by setting withinPortal to false and using a relative container. The component supports both uncontrolled defaults (position and size) and controlled visibility via opened/onClose, plus optional drag boundaries to keep windows within prescribed X/Y ranges.
For state continuity, it can persist position and size to localStorage, and it exposes onPositionChange and onSizeChange callbacks for reacting to user interactions. The window’s behavior and chrome are configurable—draggable and resizable modes, collapse/close buttons, non‑collapsible headers, and centered, immovable presets—while appearance is tailored through Mantine’s Styles API with fine‑grained classNames for internal elements. Together, these features make it a robust foundation for modals, tools, and embedded UI panels in complex interfaces.
> [!note]
>
> → Demo and Documentation → Youtube Video → More Mantine Components
``sh`
npm install @gfazioli/mantine-window
or
`sh`
yarn add @gfazioli/mantine-window
After installation import package styles at the root of your application:
`tsx`
import '@gfazioli/mantine-window/styles.css';
`tsx
import { Window } from '@gfazioli/mantine-window';
import { Title } from '@mantine/core';
function Demo() {
return (
);
}
``
Your support helps me:
- Keep the project actively maintained with timely bug fixes and security updates
- Add new features, improve performance, and refine the developer experience
- Expand test coverage and documentation for smoother adoption
- Ensure long‑term sustainability without relying on ad hoc free time
- Prioritize community requests and roadmap items that matter most
Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference. Sponsorships help cover maintenance time, infrastructure, and the countless invisible tasks that keep a project healthy.
Your help truly matters.
💚 Become a sponsor today and help me keep this project reliable, up‑to‑date, and growing for everyone.
---
https://github.com/user-attachments/assets/7f80b2c0-90b1-442f-82c8-fddb75cca14e
---
