Skip to content
VinUIFrameworks

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.

ReactVueSvelte
value + onValueChangev-modelbind:value
defaultValuedefaultValue or v-modelvalue (no bind)
open / defaultOpenv-model:open (some also take defaultOpen)bind:open / open
checked / defaultCheckedv-model / defaultCheckedbind:checked / checked
pressed / defaultPressedv-model:pressed / defaultPressedbind:pressed / pressed
React
const [plan, setPlan] = useState("pro");
<Select options={plans} value={plan} onValueChange={setPlan} label="Plan" />
Vue
<script setup>
const plan = ref("pro");
</script>
<template>
  <Select :options="plans" v-model="plan" label="Plan" />
</template>
Svelte
<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.

React
<Dialog
  title="Edit profile"
  trigger={<Button>Edit</Button>}
  footer={<DialogClose><Button>Save</Button></DialogClose>}
>
  …
</Dialog>
Vue
<Dialog title="Edit profile">
  <template #trigger><Button>Edit</Button></template>
  …
  <template #footer><DialogClose><Button>Save</Button></DialogClose></template>
</Dialog>
Svelte
<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 #trigger slot in Vue) and add the ARIA attributes and handlers to it. Svelte can't change an element it's given, so its trigger snippet 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, SheetClose or DrawerClose. In Svelte the footer and children snippets receive a close function instead.
  • Lists of content. Svelte can't count or wrap its children, so a few components take data plus a snippet: Carousel takes items and renders each with children(item, i), and Data Table columns use a cell snippet. 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

FilesImport
ReactOne .tsx per component, parts insideimport { Card, CardHeader } from "@/components/vin/card"
VueOne .vue per component, parts exported from itimport Card, { CardHeader } from "@/components/vin/card.vue"
SvelteOne .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 Toaster in your layout and call toast() anywhere. In Svelte, import it from toast.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+.