Dracula Icon

Dash

Dracula Theme for Dash

dash - Theme preview

§Dash

pip install dash-dracula-theme

§Install manually

If you are a git user, you can install the theme and keep up to date by cloning the repo:

git clone https://github.com/dracula/dash.git
cd dash
pip install -e .

Or download using the GitHub .zip download option and unzip it.

For local development alongside your Dash app:

pip install -e /path/to/dash

§Optional — PDF export

To use fig_to_print_image() you also need reportlab and kaleido:

pip install "dash-dracula-theme[pdf]"

§Requirements

PackageMinimum version
Python3.9+
dash4.0+
plotly5.0+
dash-bootstrap-components2.0+

Note: Your Dash app must include dbc.themes.DARKLY in external_stylesheets. The Dracula CSS variables build on top of Bootstrap DARKLY's CSS variable layer.

§Activating theme

  1. Create your Dash app with Bootstrap DARKLY as the base stylesheet;
  2. Call dr.apply_theme(app) to wire the CSS and theme-toggle callback;
  3. Add the returned theme_store and dr.theme_toggle_button() to your layout;
  4. Use template="dracula" and palette constants (e.g. dr.CYAN) in your figures;
  5. Boom! It's working ✨

§Quick start

import dash
import dash_bootstrap_components as dbc
import plotly.graph_objects as go
import dash_dracula as dr

app = dash.Dash(__name__, external_stylesheets=[dbc.themes.DARKLY])
theme_store = dr.apply_theme(app)

fig = go.Figure(layout=dict(template="dracula"))
fig.add_scatter(y=[1, 2, 3], line_color=dr.CYAN)

See sample/app.py for a complete minimal example.

Mist Over Transylvania

Morbius