-
Hi everyone, I'm trying to use carbon-components-svelte as building blocks for some web components. I've cloned this repo to https://github.com/DayZeroLLC/carbon-components-svelte and made a couple svelte components that use some carbon-components-svelte. ~/lib/app.html has a html page trying to consume those components. I get errors testing with Accordion/AccordionItem/Breadcrumb/BreadcrumbItem. Any advice on what I'm doing incorrectly here? Below is the console out compaining about flatpickr (when using AccordionItem) and my attempt to import it
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I haven't worked with using Svelte in conjunction with web components. To be honest, I don't think Carbon Svelte is viable for use as web components. One of the biggest restrictions is that camel case props are not supported (e.g., I would recommend looking at https://github.com/carbon-design-system/carbon-web-components for a native solution. To anyone reading this thread: please chime in if you think otherwise. |
Beta Was this translation helpful? Give feedback.
I haven't worked with using Svelte in conjunction with web components. To be honest, I don't think Carbon Svelte is viable for use as web components.
One of the biggest restrictions is that camel case props are not supported (e.g.,
iconDescription
). Supporting web components has been proposed a couple of times: #467 #507I would recommend looking at https://github.com/carbon-design-system/carbon-web-components for a native solution.
To anyone reading this thread: please chime in if you think otherwise.