基于Mantine的Plotly Dash组件
项目描述
Dash Mantine Components 是一个基于 Mantine React 组件库的庞大(90+)Dash 组件库。它使得使用现成的精心设计的组件来创建高质量的仪表板变得更容易。
目录
安装
pip install dash-mantine-components
快速入门
from datetime import date
import dash
from dash import Dash, Input, Output, callback, html
from dash.exceptions import PreventUpdate
import dash_mantine_components as dmc
dash._dash_renderer._set_react_version('18.2.0')
app = Dash(__name__, external_stylesheets=dmc.styles.ALL)
app.layout = dmc.MantineProvider(
[
dmc.DatePicker(
id="date-picker",
label="Start Date",
description="You can also provide a description",
minDate=date(2020, 8, 5),
value=None,
w=200
),
dmc.Space(h=10),
dmc.Text(id="selected-date"),
]
)
@callback(Output("selected-date", "children"), Input("date-picker", "value"))
def update_output(d):
prefix = "You have selected: "
if d:
return prefix + d
else:
raise PreventUpdate
if __name__ == "__main__":
app.run_server(debug=True)
赞助商
感谢以下人员对我的 dash-mantine-components 工作的支援。
贡献
-
加入我们的 Discord 社区。
-
安装虚拟环境
python -m venv venv source venv/bin/activate pip install -r requirements.txt
-
安装npm依赖
npm install
-
在
src/lib/components
中添加您的新组件。请确保在src/lib/index.js
中也包含它。 -
使用命令:
npm run build
构建组件。 -
提交一个PR,包括一个示例来重现PR所做的贡献。
-
除非您已更改依赖项,否则请勿包括
package-lock.json
或yarn.lock
文件。
为文档贡献
我们非常喜欢对我们的文档的贡献!由于该项目只是一个用 dash-mantine-components
构建的 Dash 应用程序,因此这是一个为首次贡献者提供的绝佳机会。有关更多详细信息,请查看 dmc-docs GitHub。
项目详情
关闭
哈希值 for dash_mantine_components-0.14.5-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8899ec8831a171b70bc39d283ffa5a0b2825ed8f67f9ef47aa68cbb892e51e74 |
|
MD5 | cc092c7df3275462fa6769dc1e62906b |
|
BLAKE2b-256 | 790d68f55b27979924435444efd8a8eb110451c6ea3cd7d81ec75d6c76dcc57f |