Show HN: Turn Markdown into React/Svelte/Vue UI at runtime, zero build step

68 yaoke259 36 8/26/2025, 10:13:24 AM markdown-ui.com ↗

Comments (36)

lelanthran · 1h ago
Maybe I'm not understanding, but why is this "Turn Markdown into React/Svelte/Vue UI" and not "Turn Markdown into HTML"?

I'm not seeing the value of generating React, Vue or Svelte as opposed to generating DOM components.

threetonesun · 42m ago
It's very silly. Given that Markdown fully supports HTML I have built sites using just Markdown + web components but that's... just how it works.

What's really needed is a better editor experience.

didgeoridoo · 23m ago
Nice discussion on this here just a couple weeks ago: https://news.ycombinator.com/item?id=44865997
randomtoast · 45m ago
> Maybe I'm not understanding, but why is this "Turn Markdown into React/Svelte/Vue UI" and not "Turn Markdown into HTML"?

It's very simple: the post had not been upvoted to the front page with the title you suggested.

yaoke259 · 37m ago
Svelte, React and Vue allow for easier event handling, at least that was my rationale, is it possible to achieve the same with html?
lelanthran · 17m ago
> Svelte, React and Vue allow for easier event handling, at least that was my rationale, is it possible to achieve the same with html?

I'm not really sure how Svelte, React or Vue allow for easier event handling. I mean, what's harder with standard events in Vanilla JS? Sure, it's not perfect, but what exactly is easier in Svelte, React and Vue that makes the trade-off with VanillaJS a reasonable one?

Some more questions, if you don't mind:

1. I see that the event interface specifies detail with `id` and `value` fields. What is the reason for using this? The underlying event already has a target, which will have the id and the value fields anyway. Are the widget's in this system so different that they have different id fields to the DOM elements?

2. There does not appear to be a field in the emitted event for the event sub-name (other than the custom name in the event structure itself). What if a component needs to emit something other than a "click" event? Ordinarily we'd get the event name from the event itself, so the handler knows whether it is being called on "focus", "click" "activate", etc. This information is lost with a custom event.

3. I'm still confused why you can't emit DOM elements; I mean, if you said "can't do two-way data binding" or something along the similar lines, it'd (maybe) make sense, but your response makes me think that you have not even considered it. I feel, maybe wrongly, that this library is both unnecessarily crippled and over-engineered - it targets spaghetti-as-a-pattern React, but not the hierarchical DOM?

yaoke259 · 2m ago
Thanks for the questions and super valuable feedback! To be totally honest, I came from a Svelte/Framework background and just did not deeply consider/realise you can create a pure dom version and event handling with just plain js. It's definitely a valid point that I'll take into consideration into designing the next version. Currently it does seem a bit overengineered since the React, Vue and Svelte implementations are actually all wrappers over web components, and still potentially offer some (potential) advantages in advanced state management which I have not yet explored. I'll definitely look into this more deeply.
jy14898 · 1h ago
It tickled me seeing the streaming example, thinking about how much better HTML deals with streaming
yaoke259 · 34m ago
html does not allow for event handling, this allows for secure listening of the events at runtime, which afaik is not possible with html
mpalmer · 30m ago
Modern frontend frameworks wouldn't exist without JS events, not the other way around. You can absolutely do this with vanilla HTML+JS.

https://developer.mozilla.org/en-US/docs/Web/API/Event

yaoke259 · 26m ago
I suppose a vanilla js version is possible? I'll need to look into this
thrown-0825 · 1h ago
keywords for search optimization
ekusiadadus · 21m ago
I actually tried it out and it feels pretty good. Especially with SvelteKit, where the library ecosystem is still somewhat limited, a library like this is really exciting. I particularly love that it works at runtime, since implementing that myself would be a hassle—so I really appreciate it.
Tade0 · 1h ago
For me it stops working after several clicks.

The other day my project owner remarked that in the future perhaps we won't be building catalogs of items like the one I am currently, but interrogate an LLM assistant for a summary of the data - no need for forms and such.

I don't know how accurate that prediction is, but it got me thinking: what if coding assistants are a dead end and what users will actually prefer is going to be just a text box where you type in your human-language query?

Forms are here to stay at least in any kind of government or legal document, as there's liability associated with any mistakes, but less consequential stuff?

freetonik · 28m ago
>For me it stops working after several clicks.

This has been my experience with many rich web apps in the last several years. I have a habit of pressing Cmd+R especially before doing something important, and it feels like rebooting a computer in Windows 95 days.

yaoke259 · 23m ago
This happened after I turned the demo site into Astro to demo all the frameworks at once. For some reason it messes with the hydration of the site, will keep debugging...
friendzis · 40m ago
Yes and no. Natural language processing querybox will be one of the interfaces for two reasons: some people already (still?) associate that with trustworthy search, however since it is like "I'm feeling lucky" button it is perfect place to hide paid advertisements. On the other hand, your PO dismisses the value of windowshopping and I don't see good catalogs disappearing anytime soon.
yaoke259 · 29m ago
Seems like some people are confused by the design decisions of using React/Svelte/Vue and using it at runtime. The use case I had in mind was LLM interaction, which you can try in the Chat Demo (running a real llm btw!). LLMs require secure, runtime, and minimal DSL to generate interactivity, hence markdown-ui.
yaoke259 · 18m ago
I have fixed the home page bug, apologies
cluckindan · 1h ago
That’s nice for the easy stuff, but forms for any real application always have conditionally visible/required/disabled inputs/options/fieldsets.
eashish93 · 19m ago
streaming not good and smooth. You should check out streamdown.ai
_heimdall · 38m ago
Svelte, react, and vue all require a build step if I'm not mistaken. What's the value in delaying markdown transformation until runtime?
whalesalad · 5m ago
You can just include Vue on a page and go to town, no build step needed.
snickerdoodle12 · 21m ago
Only if you're using jsx
yaoke259 · 31m ago
so runtime use cases like LLMs can be supported, in the Chat example you can interact with a real llm!
AbuAssar · 1h ago
I saw this coming as there is a need for a DSL that targets LLM-first and that it will be made in the near future.

and here it is

chromehearts · 1h ago
I'm having trouble with some widget elements not registering events properly, especially the checklists.

Still looks like a solid tool tho in my opinion

yaoke259 · 35m ago
thanks :)
archerx · 1h ago
The lengths that people will go to just to not write HTML...
codegladiator · 34m ago
> ```markdown-ui-widget { "type": "button-group", "id": "plan", "label": "Plan", "choices": ["Brainstorm", "Review", "Launch"], "default": "Brainstorm" } ```

      markdown-ui-widget-html-version-long
      <button-group id=plan label=Plan choices="Brainstorm,Review,Launch" default=Brainstorm />
yaoke259 · 32m ago
I designed it this way to be more markdown like, and without support for styling
onion2k · 1h ago
This already exists in a mature state - https://mdxjs.com/
alfonsodev · 1h ago
To me it has nothing to do with mdxjs.

Check it twice, what the submission implements is writing all the UI in markdown, not mixing markdown with React.

Perhaps I don't know mdxjs enough but that's my impression.

onion2k · 56m ago
Markdown UI is loading a bunch of components and then displaying them where you want them by parsing some Markdown to figure out where they go.

MDX goes a step further by enabling you to actually write the component JSX in the Markdown as if it's React (rather than using ``` syntax). You can just display a component that was loaded from somewhere else. Basically, if you took the Markdown UI components as React components, you could use the runtime embed option from here: https://mdxjs.com/guides/embed/

yaoke259 · 35m ago
the reason I made it is that mdxjs (afaik) only works with a build step and locks the user into React, and you are still technically running code sent by the LLM, rather than a more secure static JSON like object.

No comments yet

aa-jv · 1h ago
Doesn't seem to work as intended - in the "Gather Quick Details" example form, if I change any value, that change is not updated in the results column. Am I missing something?