
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@markdown-ui/vanilla
Advanced tools
Lightweight Vanilla JS renderer for markdown-ui widgets. No framework dependencies.
npm install @markdown-ui/vanilla @markdown-ui/marked-ext
import { MarkdownUI } from '@markdown-ui/vanilla';
import '@markdown-ui/vanilla/widgets.css';
import { Marked } from 'marked';
import { markedUiExtension } from '@markdown-ui/marked-ext';
// Parse markdown with widgets
const marked = new Marked().use(markedUiExtension);
const html = marked.parse(`
# My Form
\`\`\`markdown-ui-widget
button-group env [dev staging prod] dev
\`\`\`
`);
// Render and initialize
document.getElementById('content').innerHTML = html;
const mdui = MarkdownUI.init('#content', {
onWidgetEvent: (e) => {
console.log('Widget changed:', e.detail.id, e.detail.value);
}
});
<link rel="stylesheet" href="https://unpkg.com/@markdown-ui/vanilla/dist/widgets.css">
<script src="https://unpkg.com/@markdown-ui/vanilla/dist/index.umd.js"></script>
<div id="content">
<markdown-ui-widget
id="env"
content="%7B%22type%22%3A%22button-group%22%2C%22choices%22%3A%5B%22dev%22%2C%22prod%22%5D%7D">
</markdown-ui-widget>
</div>
<script>
const mdui = MarkdownUIVanilla.MarkdownUI.init('#content', {
onWidgetEvent: (e) => console.log(e.detail)
});
</script>
MarkdownUI.init(container, options)Static factory method to initialize markdown-ui on a container.
const mdui = MarkdownUI.init('#content', {
onWidgetEvent: (e: CustomEvent<WidgetEventDetail>) => {
console.log(e.detail.id, e.detail.value);
}
});
mdui.render(html)Render HTML content containing widget elements.
mdui.destroy()Cleanup event listeners and remove widget-container class.
Widget interactions emit widget-event custom events with the following detail:
interface WidgetEventDetail {
id: string; // Widget ID
value: unknown; // Current value (type depends on widget)
}
Import the optional CSS for consistent styling:
import '@markdown-ui/vanilla/widgets.css';
Or via CDN:
<link rel="stylesheet" href="https://unpkg.com/@markdown-ui/vanilla/dist/widgets.css">
The CSS uses the same class names as @markdown-ui/react for consistency.
MIT
FAQs
Vanilla JS renderer for markdown-ui
We found that @markdown-ui/vanilla demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.