# Convert HTML to Dash

**URL:** <https://community.plotly.com/t/convert-html-to-dash/78191>\
**Category:** Dash Python\
**Tags:** show-and-tell, question\
**Created:** [August 31, 2023, 8:07pm UTC](https://community.plotly.com/t/convert-html-to-dash/78191 "2023-08-31T20:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![idling-mind](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/idling-mind/32/33248_2.png) [@idling-mind](https://community.plotly.com/u/idling-mind)\
**Post date:** [August 31, 2023, 8:07pm UTC](https://community.plotly.com/t/convert-html-to-dash/78191/1 "2023-08-31T20:07:24Z")

</div>

Hello!  
I’ve been using dash for a while now and it is becoming one of my go to library for many usecases.  
I have used html and css a bit before coming to dash and so, I felt at home with the dash layout since it’s html, but written in python.

But here are some issues I have been facing.

- I cannot copy paste html examples from web, especially when using some external css libraries
- Larger layouts were becoming too skewed to the right when written in python
- I felt, writing layout in html is still better, but i’d like to use the interactivity that dash provides.

So I have been trying to write a package ([GitHub - idling-mind/html2dash: Convert an html layout to an equivalent dash layout](https://github.com/idling-mind/html2dash)) which tires to solve this. The idea is to write the layout still in html. Also, along with regular html tags, you can use dash specific tags also. For eg: you could use `<Badge>hello</Badge>` to render a badge from from `dash_mantine_components`.

Details are in the repo’s readme. Also there is an example where I tried to copy paste the html from [Tabler Dashboard UI Kit - Bootstrap Admin Panel](https://tabler.io/preview) to see if it rendered properly. (more or less! svgs and some input tags did not render, i switched some with other dash tags)

I’d like to know from the community if this is a worthwhile pursuit? Does this make your life easier? or is it better to write the layout in python itself?

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [September 1, 2023, 3:13pm UTC](https://community.plotly.com/t/convert-html-to-dash/78191/2 "2023-09-01T15:13:23Z")

</div>

hi @idling-mind  
This is cool. I like the thought process behind this repo. Personally, I don’t think I would use it since the layouts I create are not too long and I got into Dash for the specific reason of not wanting to write html.

That said, I can definitely see people using this library if their layouts are very long or if they already know html and feel stronger with that language.

I look forward to reading what other community members think.

---

<div class="post-metadata">

**Author:** ![idling-mind](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/idling-mind/32/33248_2.png) [@idling-mind](https://community.plotly.com/u/idling-mind)\
**Post date:** [September 1, 2023, 5:16pm UTC](https://community.plotly.com/t/convert-html-to-dash/78191/3 "2023-09-01T17:16:38Z")

</div>

Thanks @adamschroeder for your comment. Yeah, I myself won’t use it for smaller layouts.
