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.
Metadata
Release files for dmc-pip-drawer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dmc_pip_drawer-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dmc_pip_drawer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / dmc_pip_drawer-0.1.0.tar.gz
| Download URL | dmc_pip_drawer-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
875dc059c2e81cceba6967aae89b2c8e98be4e81321a145cfc68f86facd7586a
|
|
BLAKE2b-256 checksum How to use checksums |
ad7ed611c5f2a4a6d3c7540ded8d6711b2c6e3dbfd3f361f3da5e0ce603b5bad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / dmc_pip_drawer-0.1.0-py3-none-any.whl
| Download URL | dmc_pip_drawer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a763dad63dec5ade5775a1cfd728866fb74069050767c3adf444e922361d72c2
|
|
BLAKE2b-256 checksum How to use checksums |
fef096b2d65c94c71f24f284f46abd626b5567a511c2a5f2c56820767ccaf35e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|