Use of HA Web components in custom UI #11131
Unanswered
kvj
asked this question in
Other feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm working on the UI for my custom component, following https://developers.home-assistant.io/docs/frontend/custom-ui/creating-custom-panels
Can I use existing
ha-*
web components for my UI? I would like to, they're super convenient, but the documentation isn't very clear about it. Here https://developers.home-assistant.io/docs/frontend/custom-ui/lovelace-custom-card example shows how to useha-card
, but, when I'm trying to use for ex.hass-tabs-subpage-data-table
, it doesn't work, because of the lazy loading. But after I visit any built-in panel which is using that component, my panel is also being loaded. I understand all webpack, modules, import stuff, and that I can't importha-*
components directly into my custom JS.Why am I facing this?
I originally started making my UI using the tutorial above, importing
lit
and custom UI web components, and I've realized that I can't import@paper
,@mwc
web components, as they're already registered inside the page. So, I either would like to find a way to re-use HA stuff as much as possible (preferred) or will be forced to use some completely different UI library to avoidcustomElements
conflicts.Is it possible (recommended) to re-use HA web components for the custom UI?
Beta Was this translation helpful? Give feedback.
All reactions