The Dash Architecture
Learn about the Dash components, Dash layout, and Dash callback functions.
Dash components
Dash components are the fundamental building blocks of any Dash app in Python. They can be thought of as the various pieces of the puzzle that make up the user interface of the application.
In Dash, we have many different types of components. Here we include some of the most commonly used ones.
Dash Core Components
Here’s how we can incorporate the many core components of Dash into our app.
from dash import dcc
Dash Core Components such as dropdowns, date pickers, checkboxes, sliders, graphs (and many more) make it easy for developers to create dynamic and interactive web applications customized to fit the specific needs of all stakeholders involved.
Advantages | Disadvantages |
Easy to reuse, keeping code modular and less error-prone | A more nuanced understanding of web development is required to leverage the true potential of these component |
Highly customisable | -- |
Constantly innovating by improving existing core components and adding new ones as needed | -- |
Exceptional documentation and a lively community forum that you can consult for any | -- |
Dash HTML Components
Here is how we are able to use Dash HTML components within an app:
from dash import html
The Dash HTML Components module provides a way to compose web applications that allow one to gain all the benefits that HTML has to offer without having to write pure HTML (or use a templating engine). While traditional HTML uses tags to create app components such as links, images, buttons, etc., we instead use the html
module from Dash, where tags are defined as Python classes. ...