Glass morphism Drawer + ScrollArea component for Dash Mantine Components
Project description
dmc-pip-drawer
A glass morphism Drawer + ScrollArea component for Dash Mantine Components.
Features
- Single-scroll-overlay pattern — no double scrollbars
- Glass morphism scrollbar — Apple-inspired frosted glass effect
- Controllable glass opacity —
glass_opacityprop (0.0 transparent → 1.0 opaque) - Dark mode support — automatic adaptation
- Mobile-first — bottom drawer, responsive scrollbar sizing
- Zero JS — pure Python composition, no build step
Installation
pip install dmc-pip-drawer
Quick Start
from dash import Dash, callback, Output, Input
import dash_mantine_components as dmc
from dmc_pip_drawer import PipDrawer
app = Dash(__name__)
app.layout = dmc.MantineProvider(
children=[
dmc.Button("Open Drawer", id="open-btn"),
PipDrawer(
id="my-drawer",
title="My Panel",
glass_opacity=0.85,
children=[
dmc.Text("Hello from PipDrawer!"),
# Add enough content to scroll...
],
),
]
)
@callback(
Output("my-drawer", "opened"),
Input("open-btn", "n_clicks"),
prevent_initial_call=True,
)
def open_drawer(n):
return True
if __name__ == "__main__":
app.run(debug=True)
Note: Copy pip_drawer.css to your assets/ folder, or it ships automatically when installed via pip.
API
PipDrawer(
id="drawer-id", # Required — used in callbacks
children=None, # Content inside the ScrollArea
title="Panel Title", # Drawer header
opened=False, # Controlled via callback
position="bottom", # "bottom", "top", "left", "right"
size="92%", # Max height/width
scroll_type="auto", # ScrollArea type
className="", # Additional CSS classes
padding="md", # Content padding (Mantine spacing)
glass_opacity=0.85, # Glass background opacity (0.0–1.0)
**drawer_props # Passthrough to dmc.Drawer
)
glass_opacity
Controls the translucency of the drawer's frosted glass background.
| Value | Effect |
|---|---|
0.0 |
Fully transparent — content behind is fully visible |
0.5 |
Semi-transparent — balanced glass effect |
0.85 |
Default — subtle translucency with strong frosted glass |
1.0 |
Fully opaque — no see-through |
Works in both light and dark mode automatically.
CSS
The package includes pip_drawer.css with:
- Single-scroll-overlay — structural CSS for the Drawer
- Glass morphism scrollbar — styled track + thumb with backdrop-filter
- Dark mode — adapted colors via
[data-mantine-color-scheme="dark"] - Responsive sizing — mobile, desktop, large screen, touch device breakpoints
- Reduced motion — respects
prefers-reduced-motion
Links
License
MIT License - Copyright (c) 2025 Pip Install Python LLC
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmc_pip_drawer-0.1.0.tar.gz.
File metadata
- Download URL: dmc_pip_drawer-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
875dc059c2e81cceba6967aae89b2c8e98be4e81321a145cfc68f86facd7586a
|
|
| MD5 |
6f134a514b90afe1a7b03361eca46105
|
|
| BLAKE2b-256 |
ad7ed611c5f2a4a6d3c7540ded8d6711b2c6e3dbfd3f361f3da5e0ce603b5bad
|
File details
Details for the file dmc_pip_drawer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dmc_pip_drawer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a763dad63dec5ade5775a1cfd728866fb74069050767c3adf444e922361d72c2
|
|
| MD5 |
ca808f4f42d8b4de9381675efe8e9409
|
|
| BLAKE2b-256 |
fef096b2d65c94c71f24f284f46abd626b5567a511c2a5f2c56820767ccaf35e
|