Dash Core Components

2.0.0 · active · verified Sat Apr 11

Dash Core Components (dcc) is a suite of interactive user interface components for building analytical web applications with Dash. It provides essential UI elements like dropdowns, sliders, graphs, and input fields. As of version 2.0.0, it is integrated directly into the main `dash` library, simplifying imports. Maintained by Plotly, its release cadence is tied to that of the overarching Dash framework, seeing significant updates with major Dash versions.

Warnings

Install

Imports

Quickstart

A minimal Dash application demonstrating the layout with a `dcc.Dropdown` component. This example initializes a Dash app, defines a simple layout containing a heading, a dropdown menu from `dcc`, and an empty div to display output (which would typically be updated by a callback).

from dash import Dash, html, dcc

app = Dash(__name__)

app.layout = html.Div([
    html.H1("My Dash App with Core Components"),
    dcc.Dropdown(
        ['New York City', 'Montréal', 'San Francisco'],
        'Montréal',
        id='city-dropdown'
    ),
    html.Div(id='output-container')
])

# Callbacks would typically be added here for interactivity

if __name__ == '__main__':
    app.run_server(debug=True)

view raw JSON →