|
| 1 | +--- |
| 2 | +author: Wendelin Peleska |
| 3 | +authorURL: https://github.com/wendevlin |
| 4 | +title: "Frontend component updates in 2026.5" |
| 5 | +--- |
| 6 | + |
| 7 | +## Component updates |
| 8 | + |
| 9 | +### ha-progress-bar |
| 10 | + |
| 11 | +A new component replaces `mwc-progress-bar` in our codebase and is fully themeable. Check out this [PR](https://github.com/home-assistant/frontend/pull/51489) for a fully custom progress bar. |
| 12 | + |
| 13 | +New component specific tokens: |
| 14 | + |
| 15 | +```css |
| 16 | +--ha-progress-bar-indicator-color |
| 17 | +--ha-progress-bar-indicator-background |
| 18 | +--ha-progress-bar-track-color |
| 19 | +--ha-progress-bar-track-height |
| 20 | +--ha-progress-bar-border-radius |
| 21 | +--ha-progress-bar-animation-duration |
| 22 | +--ha-progress-bar-indicator-highlight-image |
| 23 | +--ha-progress-bar-indicator-highlight-width |
| 24 | +--ha-progress-bar-indicator-highlight-height |
| 25 | +``` |
| 26 | + |
| 27 | +### ha-switch |
| 28 | + |
| 29 | +`ha-switch` was migrated to webawesome. It now has many CSS properties to make customization easier. We also removed some tokens from the old switch: |
| 30 | + |
| 31 | +Removed tokens: |
| 32 | + |
| 33 | +```css |
| 34 | +--switch-unchecked-button-color |
| 35 | +--switch-unchecked-track-color |
| 36 | +--switch-unchecked-color |
| 37 | +--switch-checked-button-color |
| 38 | +--switch-checked-track-color |
| 39 | +--switch-checked-color |
| 40 | +``` |
| 41 | + |
| 42 | +New component specific tokens: |
| 43 | + |
| 44 | +```css |
| 45 | +--ha-switch-size |
| 46 | +--ha-switch-thumb-size |
| 47 | +--ha-switch-width |
| 48 | +--ha-switch-background-color |
| 49 | +--ha-switch-thumb-background-color |
| 50 | +--ha-switch-background-color-hover |
| 51 | +--ha-switch-thumb-background-color-hover |
| 52 | +--ha-switch-checked-background-color |
| 53 | +--ha-switch-checked-thumb-background-color |
| 54 | +--ha-switch-checked-background-color-hover |
| 55 | +--ha-switch-checked-thumb-background-color-hover |
| 56 | +--ha-switch-border-color |
| 57 | +--ha-switch-thumb-border-color |
| 58 | +--ha-switch-thumb-border-color-hover |
| 59 | +--ha-switch-checked-border-color |
| 60 | +--ha-switch-checked-thumb-border-color |
| 61 | +--ha-switch-checked-border-color-hover |
| 62 | +--ha-switch-checked-thumb-border-color-hover |
| 63 | +--ha-switch-thumb-box-shadow |
| 64 | +--ha-switch-disabled-opacity |
| 65 | +--ha-switch-required-marker |
| 66 | +--ha-switch-required-marker-offset |
| 67 | +``` |
| 68 | + |
| 69 | +### ha-checkbox |
| 70 | + |
| 71 | +`ha-checkbox` was also migrated to webawesome and got new CSS properties. You can no longer use MDC tokens for it, but we added a set of tokens to customize the new checkbox. |
| 72 | + |
| 73 | +New component specific tokens: |
| 74 | + |
| 75 | +```css |
| 76 | +--ha-checkbox-size |
| 77 | +--ha-checkbox-border-color |
| 78 | +--ha-checkbox-border-color-hover |
| 79 | +--ha-checkbox-background-color |
| 80 | +--ha-checkbox-background-color-hover |
| 81 | +--ha-checkbox-checked-background-color |
| 82 | +--ha-checkbox-checked-background-color-hover |
| 83 | +--ha-checkbox-checked-icon-color |
| 84 | +--ha-checkbox-checked-icon-scale |
| 85 | +--ha-checkbox-border-radius |
| 86 | +--ha-checkbox-border-width |
| 87 | +--ha-checkbox-required-marker |
| 88 | +--ha-checkbox-required-marker-offset |
| 89 | +``` |
| 90 | + |
| 91 | +### ha-textarea |
| 92 | + |
| 93 | +`ha-textarea` was migrated to webawesome and got new CSS properties. You can no longer use MDC tokens for it, but we added a set of tokens to customize the new textarea. |
| 94 | + |
| 95 | +The API changed slightly. To make your textarea grow in size, set the `resize` prop to `auto`. |
| 96 | + |
| 97 | +### ha-adaptive-popover |
| 98 | + |
| 99 | +You might already know the (fairly new) `ha-adaptive-dialog` component. It combines a dialog and bottom sheet by showing a dialog on desktop and a bottom sheet on mobile. |
| 100 | +We added `ha-adaptive-popover` as the popover counterpart to the adaptive dialog. It shows a popover on desktop and a bottom sheet on mobile. It is based on `ha-adaptive-dialog` and is currently used in the tile card date picker feature. |
| 101 | + |
| 102 | +### Removed ha-fab |
| 103 | + |
| 104 | +`ha-fab` was removed, we use just a normal `ha-button` now, since the position styling was always done from the parent component. |
| 105 | + |
| 106 | +## Style updates |
| 107 | + |
| 108 | +### Box shadow tokens |
| 109 | + |
| 110 | +We added new global box shadow tokens: `--ha-box-shadow-s`, `--ha-box-shadow-m`, `--ha-box-shadow-l` |
| 111 | + |
| 112 | +But we also removed the old box shadow tokens: |
| 113 | + |
| 114 | +```css |
| 115 | +--ha-color-shadow-light |
| 116 | +--ha-color-shadow-dark |
| 117 | +--ha-shadow-offset-x-... |
| 118 | +--ha-shadow-blur-... |
| 119 | +--ha-shadow-spread-.. |
| 120 | +``` |
| 121 | + |
| 122 | + |
| 123 | +### Surface colors |
| 124 | + |
| 125 | +In the next release we plan to change the way we handle surface background colors. The tokens are introduced now but are just used for ha-tooltip. |
| 126 | + |
| 127 | +New tokens: |
| 128 | + |
| 129 | +```css |
| 130 | +--ha-color-surface-default |
| 131 | +--ha-color-surface-low |
| 132 | +--ha-color-surface-lower |
| 133 | +--ha-color-surface-default-inverted |
| 134 | +--ha-color-surface-low-inverted |
| 135 | +--ha-color-surface-lower-inverted |
| 136 | +``` |
0 commit comments