Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion articles/components/dashboard/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A component for building static dashboard layouts and dynamic, user-configurable
:commercial-feature: Dashboard
include::{articles}/_commercial-banner.adoc[opts=optional]

[.example.tall]
[.example.tall,themes="lumo,aura"]
--
ifdef::flow[]
[source,java]
Expand Down
103 changes: 65 additions & 38 deletions articles/components/dashboard/styling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ order: 50

The following style variants can be applied to the Dashboard to change its appearance:

[cols="2,2,3"]
[cols="1,3,1"]
|===
| Flow `DashboardVariant` | `theme` attribute | Description
| Variant | Description | Supported by

| `LUMO_SHADED_BACKGROUND` | `shaded-background` | Applies shading to the dashboard background.
| `shaded-background`
| Applies shading to the dashboard background.
| Lumo

| `LUMO_ELEVATED_WIDGETS` | `elevated-widgets` | Makes the widgets appear elevated above the dashboard surface.
| `elevated-widgets`
| Makes the widgets appear elevated above the dashboard surface.
| Lumo

| `LUMO_FLAT_WIDGETS` | `flat-widgets` | A flat, borderless widget style.
| `flat-widgets`
| A flat, borderless widget style.
| Lumo

|===

Expand All @@ -32,72 +38,93 @@ include::{root}/frontend/demo/component/dashboard/dashboard-variants.ts[render,p

include::../_styling-section-theming-props.adoc[tag=style-properties]

[cols="1,2,1"]
=== Layout Properties

[cols="3,1"]
|===
| Feature | Property | Default Value
| Property | Supported by

|Minimum column width
|`--vaadin-dashboard-col-min-width`
|`25rem`
|Aura, Lumo

|Maximum column width
|`--vaadin-dashboard-col-min-width`
|`1fr`
|`--vaadin-dashboard-col-max-width`
|Aura, Lumo

|Maximum column count
|`--vaadin-dashboard-col-max-count`
|
|Aura, Lumo

|Minimum row height
|`--vaadin-dashboard-row-min-height`
|`12rem`
|Aura, Lumo

|Dashboard padding (around contents)
|`--vaadin-dashboard-padding`
|`--lumo-space-m`
|Aura, Lumo

|Widget gap
|`--vaadin-dashboard-gap`
|`--lumo-space-m`
|Aura, Lumo

|===


=== Widget Properties

[cols="3,1"]
|===
| Property | Supported by

|Widget background
|`--vaadin-dashboard-widget-background`
|`--lumo-base-color`
|Aura, Lumo

|Widget corner radius
|`--vaadin-dashboard-widget-border-radius`
|`--lumo-border-radius-l`
|Aura, Lumo

|Widget border width
|`--vaadin-dashboard-widget-border-width`
|`--1px`
|Aura, Lumo

|Widget border color
|`--vaadin-dashboard-widget-border-color`
|`--lumo-contrast-20pct`
|Aura, Lumo

|Widget shadow (non-editable)
|`--vaadin-dashboard-widget-shadow`
|`0 0 0 0 transparent`
|Aura, Lumo

|Widget content padding
|`--vaadin-dashboard-widget-padding`
|`0px`
|Lumo

|`--vaadin-dashboard-widget-header-padding`
|Aura

|`--vaadin-dashboard-widget-title-color`
|Aura

|`--vaadin-dashboard-widget-title-font-size`
|Aura

|`--vaadin-dashboard-widget-title-font-weight`
|Aura

|`--vaadin-dashboard-widget-title-line-height`
|Aura

|Widget title wrapping
|`--vaadin-dashboard-widget-title-wrap`
|`wrap`
|Aura, Lumo

|Drop target / resize box background color
|`--vaadin-dashboard-drop-target-background-color`
|`--lumo-primary-color-10pct`
|Lumo

|Drop target / resize box border
|`--vaadin-dashboard-drop-target-border`
|`--1px dashed var(--lumo-primary-color-50pct)`
|Lumo

|===

=== Section Properties

[cols="3,1"]
|===
| Property | Supported by

|`--vaadin-dashboard-section-border-radius`
|Aura

|===


include::../_styling-section-intros.adoc[tag=selectors]
Expand Down
4 changes: 2 additions & 2 deletions frontend/themes/docs/dashboard.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.dashboard-widget-content {
--stripe-color: hsla(214, 61%, 25%, 0.075);
height: 100%;
background: repeating-linear-gradient(45deg, var(--lumo-contrast-5pct), var(--lumo-contrast-5pct) 10px, transparent 10px, transparent 20px) var(--lumo-contrast-5pct);
border-radius: var(--lumo-border-radius-m);
background: repeating-linear-gradient(45deg, var(--stripe-color), var(--stripe-color) 10px, transparent 10px, transparent 20px) var(--stripe-color);
}

.dashboard-widget-content.small {
Expand Down