Skip to content

Commit 3f66bf3

Browse files
authored
Update frontend_creating_custom_panels.markdown
1 parent 8231f3c commit 3f66bf3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

source/developers/frontend_creating_custom_panels.markdown

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,28 @@ sharing: true
99
footer: true
1010
---
1111

12-
Any component has the possibility to add a panel to the frontend. Panels will be rendered full screen and have real-time access to the Home Assistant object via JavaScript. Examples of this in the app are map, logbook and history.
12+
Panels are pages within Home Assistant that show information within Home Assistant and can allow controlling it. Panels are linked from the sidebar and rendered full screen. The have have real-time access to the Home Assistant object via JavaScript. Examples of panels in the app are map, logbook and history.
13+
14+
Besides components registering panels, users can also register panels using the `panel_custom` component. This allows users to quickly build their own custom interfaces for Home Assistant.
15+
16+
### {% linkable_title Before you get started %}
17+
18+
The Home Assistant user interface is currently served to browsers in modern JavaScript and older JavaScript (ES5). The older version has a wider browser support but that comes at a cost of size, performance and more difficult to get started building panels for authors.
19+
20+
We therefore advice to set up the frontend to serve the modern version of the frontend so that you won't need any build tools while developing. If you realize that your audience requires both, you can add a transpilation step in the future. To set up your frontend to always serve the latest version, add this to your config:
21+
22+
```
23+
frontend:
24+
javascript_version: latest
25+
```
26+
27+
### {% linkable_title Building your first panel %}
1328

1429
Create a file called `hello.html` in your <config dir>/panels/.
1530

1631
The `hello.html` contains the needed building blocks to create the elements inside the view.
1732

18-
```javascript
33+
```html
1934
<dom-module id='ha-panel-hello'>
2035
<template>
2136
<style>

0 commit comments

Comments
 (0)