Frameworks
Every component comes for HTML, React, Vue and Svelte. Each version follows its framework's own habits, so the way you pass values and content differs a little. This page lists how.
What stays the same
- The markup. All four render the same tags and classes as the HTML on each component page. Tests check this for every example, so styles and the screenshots apply to all of them.
- Names. Components, parts and props have the same names (
Card,CardHeader,variant,size). Props are listed on each component page. - Behaviour and accessibility. Keyboard support, focus handling and ARIA are the same in every version.
Values
React has a controlled value and an uncontrolled defaultValue. Vue and Svelte use two-way binding instead; a plain value is just the starting value.
| React | Vue | Svelte |
|---|---|---|
value + onValueChange | v-model | bind:value |
defaultValue | defaultValue or v-model | value (no bind) |
open / defaultOpen | v-model:open (some also take defaultOpen) | bind:open / open |
checked / defaultChecked | v-model / defaultChecked | bind:checked / checked |
pressed / defaultPressed | v-model:pressed / defaultPressed | bind:pressed / pressed |
const [plan, setPlan] = useState("pro");
<Select options={plans} value={plan} onValueChange={setPlan} label="Plan" /><script setup>
const plan = ref("pro");
</script>
<template>
<Select :options="plans" v-model="plan" label="Plan" />
</template><script>
let plan = $state("pro");
</script>
<Select options={plans} bind:value={plan} label="Plan" />The change callbacks (onValueChange, onOpenChange, onCheckedChange…) exist in Svelte too, for when you want to react to a change without binding. Calendar, Date Picker and Combobox take the same value shapes everywhere: a "YYYY-MM-DD" string, or { from, to } in range mode.
Content and triggers
Where a React prop takes elements (trigger, title, icon, footer…), Vue uses a slot with the same name and Svelte a snippet. Plain text can still be passed as a prop.
<Dialog
title="Edit profile"
trigger={<Button>Edit</Button>}
footer={<DialogClose><Button>Save</Button></DialogClose>}
>
…
</Dialog><Dialog title="Edit profile">
<template #trigger><Button>Edit</Button></template>
…
<template #footer><DialogClose><Button>Save</Button></DialogClose></template>
</Dialog><Dialog title="Edit profile">
{#snippet trigger(props)}<Button {...props}>Edit</Button>{/snippet}
…
{#snippet footer(close)}<Button onclick={close}>Save</Button>{/snippet}
</Dialog>- Triggers. React and Vue take your button (a prop in React, the
#triggerslot in Vue) and add the ARIA attributes and handlers to it. Svelte can't change an element it's given, so itstriggersnippet receives those props for you to spread:{...props}. This applies to Dialog, Alert Dialog, Sheet, Drawer, Popover, Hover Card, Dropdown Menu, Command Dialog and Tooltip. - Closing. React and Vue wrap a button in
DialogClose,SheetCloseorDrawerClose. In Svelte thefooterandchildrensnippets receive aclosefunction instead. - Lists of content. Svelte can't count or wrap its children, so a few components take data plus a snippet: Carousel takes
itemsand renders each withchildren(item, i), and Data Table columns use acellsnippet. In Vue, Data Table cells use a#cell-<key>slot.
Events
React and Svelte use callback props (onSelect, onComplete, onLayout). Vue emits events with the same name in kebab case: @select, @complete, @layout, @update:open. Plain HTML fires DOM events where a component reports something: vin-resize (Resizable), vin-feedback (Message), vin-submit and vin-skip (Questionnaire).
Files and imports
| Files | Import | |
|---|---|---|
| React | One .tsx per component, parts inside | import { Card, CardHeader } from "@/components/vin/card" |
| Vue | One .vue per component, parts exported from it | import Card, { CardHeader } from "@/components/vin/card.vue" |
| Svelte | One .svelte per part (card.svelte, card-header.svelte) | import CardHeader from "$lib/components/vin/card-header.svelte" |
Each component page lists the exact imports for every framework. Helpers such as toast(), buttonClasses, formatBytes and niceTicks are exported from their component's file in every version (in Svelte, from its module script).
Component notes
- Toast. Put one
Toasterin your layout and calltoast()anywhere. In Svelte, import it fromtoast.svelte. - Resizable in Svelte. Server-rendered handles get their size values once the page loads, because panels register as they render.
- Attachment. In plain HTML the remove and retry buttons aren't wired up: your app owns the list. In React and Svelte pass
onRemove/onRetry; in Vue listen for@remove/@retry. The buttons only show when you do. - Versions. React 18+, Vue 3.4+, Svelte 5.29+.
Customize
Saved in this browser. Style and accent are in the header.