Mantine DataTable for Dash applications.
Project description
dash-mantine-datatable
dash-mantine-datatable is a Dash wrapper around Mantine DataTable with a
Dash-friendly API, Mantine style props, and chainable Python helpers for
columns, grouping, rows, selection, pagination, sorting, and search.
Install
pip install dash-mantine-datatable
Quick Start
from dash import Dash
import dash_mantine_components as dmc
import dash_mantine_datatable as dmdt
app = Dash()
app.layout = dmc.MantineProvider(
dmdt.DataTable(
id="employees",
data=[
{"id": 1, "name": "Avery Stone", "team": "Platform", "status": "On Track"},
{"id": 2, "name": "Mina Patel", "team": "Growth", "status": "Planning"},
],
columns=[
{"accessor": "name", "sortable": True},
{"accessor": "team", "sortable": True},
{"accessor": "status", "presentation": "badge"},
],
).update_layout(radius="lg", withTableBorder=True, striped=True)
)
if __name__ == "__main__":
app.run(debug=True)
Highlights
- Mantine-flavored Dash props such as
radius,bg,classNames,styles,bd, andbdrs - Chainable helpers including
update_layout(),update_table_properties(),update_columns(),group_columns(),update_rows(),update_selection(),update_pagination(),update_sorting(), andupdate_search() - Dash-safe component templates for column filters, empty states, custom loaders, row expansion content, and sort icons
- Support for grouped headers, nested rows, row dragging, server-side pagination, and selector-based row styling rules
- Multi-language Dash component assets for Python, R, and Julia generated from the same source tree
Helper Example
table = (
dmdt.DataTable(
data=[{"id": 1, "name": "Avery", "salary": 128000, "status": "On Track"}],
columns=[
dmdt.Column("name"),
dmdt.Column("salary", textAlign="right", presentation="currency", currency="USD"),
dmdt.Column("status", presentation="badge"),
],
)
.update_columns(selector="name", title="Employee")
.update_rows(selector={"status": "On Track"}, className="row-ok")
.update_selection(selectionTrigger="checkbox")
.update_pagination(recordsPerPage=10)
)
Local Development
npm install --legacy-peer-deps
python -m pip install -r requirements.txt -r tests/requirements.txt
npm run build
python -m pytest
python usage.py
Publishing
.\scripts\check-release.ps1
python -m twine upload --repository testpypi dist/*
Smoke-test the TestPyPI release in a fresh virtual environment before uploading
the same artifact set to PyPI. The release check rebuilds the JavaScript bundle,
runs the test suite, builds the sdist and wheel, and verifies that the release
artifacts include the bundled JS assets, metadata.json, package-info.json,
README.md, and LICENSE.
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 dash_mantine_datatable-0.1.0.tar.gz.
File metadata
- Download URL: dash_mantine_datatable-0.1.0.tar.gz
- Upload date:
- Size: 151.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b00ca8f7ce3f24e8386181ef972e3e3aff5867c1b90ca4b246eec9f49c570e4
|
|
| MD5 |
a7d3b1cd00e2dd005dd371fb39143204
|
|
| BLAKE2b-256 |
34922475119509592eaad583b79185ac82cbc214411451ada074b12afa844492
|
File details
Details for the file dash_mantine_datatable-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dash_mantine_datatable-0.1.0-py3-none-any.whl
- Upload date:
- Size: 148.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7713860f2ea1aa8fa7d78c0753ca97be32883fa06666ca7cf92007eb73753562
|
|
| MD5 |
28fb6429ccaf023e8a7015c00307e05c
|
|
| BLAKE2b-256 |
3eb7c0433963c798256ca30c28fd27199c19f504a2a7c8b566b99bc8b07a9fd9
|