Compose a view
Use functions, typed props, and async data to build reusable HTML components.
Write your first componentCompose typed, async components in your existing server. Start with an HTML response, then let slower parts of the page arrive when they are ready.
npm install @vincle/core
pnpm add @vincle/core
bun add @vincle/core
import { renderToString } from "@vincle/core";function App({ name }: { name: string }) { return <h1>Hello, {name}!</h1>;}const page = <App name="world" />;const html = await renderToString(page);<h1>Hello, world!</h1>
The rendered output is a plain HTML string.
Keep your server and routing. Choose how much rendering behavior each page needs.
Use functions, typed props, and async data to build reusable HTML components.
Write your first componentRender with @vincle/core and send the HTML from your existing HTTP handler.
Connect a view to your serverAdd @vincle/flow to send the page shell first, then deliver deferred HTML fragments.
Stream a fragmentKeep the heading visible while an async component loads. With flow, a fallback fills the space until its HTML is ready.
Choose how it is delivered: natively, or through an HTMX or Turbo adapter.
Follow the complete example// Results is an ordinary async component; the page opts in:function Page() { return ( <main> <h1>Search results</h1> <Defer fallback={<p>Loading results…</p>}> <Results /> </Defer> </main> );}const stream = renderToStream(() => <Page />, NativeAdapter);1 · The shell arrives first
Loading results…
2 · The patch replaces the fallback
<template data-for="fragment-1"><ul><li><a href="/guide/getting-started/installation">Getting started</a></li></ul></template>Typed views, predictable rendering, and explicit HTML boundaries.
View source on GitHubFetch data inside the component that needs it. Vincle awaits the tree.
Share a value with a subtree through a React-style context Provider, or keep per-request state in a Scope.
Content is escaped by default, dangerous URL schemes are blocked, and function-valued attributes are refused.
Write components and HTML attributes with TypeScript checking your work.
One maintainer, a scope that stays small, and checks you can read for yourself.
Vincle renders HTML on the server and stops there. Its scope is deliberate: views render to HTML without a virtual DOM, hydration or a reconciler.
Read the comparisonIssues and proposals are read by the maintainer who can act on them. A well-argued proposal can ship in the next release, as long as it fits the project's scope.
Open an issueTests, differential fuzzers, mutation testing and comparative benchmarks are public, method included. They support specific claims; they are not an external audit.
See the checksAn MIT-licensed library you adopt view by view, keeping your server and routing. Rendering HTML imposes no client runtime; streaming can add a patch script, depending on the adapter. Its APIs are still a dependency, and porting views elsewhere is real work.
Read the license