From the course: Interactive Dashboards with Plotly and Dash
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Styling interactive elements
From the course: Interactive Dashboards with Plotly and Dash
Styling interactive elements
- [Instructor] All right, so let's take a look at styling DCC components. As we saw in the last lesson, DCC components don't inherit the parent Div Styles the same way that traditional HTML elements do. We can apply some stylistic touches to them using our style arguments, but it's worth pointing out that some portions of DCC components can really only be modified if we change the underlying CSS code. And so in a few lessons, I'm going to show us a way to shortcut learning CSS and make some really pretty apps using some pre-built themes. That said, let's go ahead and take a look at styling these components. So here I've defined a style dictionary, My Dash App Style, color light gray, background color black font, family Arial. We're applying this to our parent Div. And then if we take a look at our dropdown, I'm now applying another style. Our color's going to be light gray, and our background color's going to be black. And when we run this cell, we end up with this app. And so the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Intro to dashboard layouts2m 26s
-
(Locked)
Visual elements and layout options4m 40s
-
(Locked)
Revisiting Dash app layouts3m 54s
-
(Locked)
HTML and markdown7m 17s
-
(Locked)
Assignment: HTML and markdown2m 15s
-
(Locked)
Solution: HTML and markdown2m 28s
-
(Locked)
HTML styles5m 58s
-
(Locked)
Styling interactive elements4m 9s
-
(Locked)
Styling Plotly figures3m 4s
-
(Locked)
Assignment: App styling1m 26s
-
(Locked)
Solution: App styling2m 25s
-
(Locked)
Dash Bootstrap components4m 10s
-
(Locked)
Dash Bootstrap themes5m 1s
-
(Locked)
Demo: Applying a Bootstrap theme4m 27s
-
(Locked)
Grid-based layouts6m 44s
-
(Locked)
Demo: Grid-based layouts5m 54s
-
(Locked)
Multiple tabs3m 45s
-
(Locked)
Demo: Multiple tabs3m 48s
-
(Locked)
Assignment: Building a layout1m 27s
-
(Locked)
Solution: Building a layout3m 10s
-
(Locked)
Key takeaways2m 9s
-
(Locked)
-
-