Reka UI logoReka
backdrop
Guides

Migration - Radix Vue to Reka UI

This guide provides step-by-step instructions for developers transitioning their projects from Radix Vue to Reka UI.

Installation

First and foremost, you need to install the latest reka-ui.

sh
$ npm add reka-ui

Congratulation! 🎉 Now that you've installed the above package, let's perform the migration! The first 2 steps are relatively simple. Just do a global search and replace for the following changes.

Codemods

To assist with the upgrade from Radix Vue to Reka UI, we collaborated with the Codemod team to automatically update your code to many of the new updates and patterns with open-source codemods. You can run the following command to automatically migrate to Reka UI:

Migration recipe
bash
npx codemod reka-ui/migration-recipe

The migration recipe will run the following codemods from the radix-vue Codemod repository:

Import Statement Changes

The primary change in imports is replacing radix-vue with reka-ui.

vue
<script setup lang="ts">
import { TooltipPortal, TooltipRoot, TooltipTrigger } from 'radix-vue'
import { TooltipPortal, TooltipRoot, TooltipTrigger } from 'reka-ui'
</script>
Codemod available
bash
npx codemod reka-ui/import-update

Naming Convention Changes

CSS variable and data attributes names have been updated to use the reka prefix instead of radix.

  --radix-accordion-content-width: 300px;
  --reka-accordion-content-width: 300px;

  [data-radix-collection-item] {}
  [data-reka-collection-item] {}
Codemod available
bash
npx codemod reka-ui/update-css-and-data-attributes

Component Breaking Changes

Combobox

Arrow

Form component

Pagination

  • Required itemsPerPage prop - Instead of default itemsPerPage value, now it is required as to provide a more explicit hint about the page size.

    vue
    <template>
      <PaginationRoot :items-per-page="10" />
    </template>

Calendar

  • Remove deprecated step prop - Use prevPage/nextPage props for greater control.

    vue
    <script setup lang="ts">
    function pagingFunc(date: DateValue, sign: -1 | 1) { 
      if (sign === -1) 
        return date.subtract({ years: 1 }) 
      return date.add({ years: 1 }) 
    } 
    </script>
    
    <template>
      <CalendarPrev step="year" />
      <CalendarPrev :prev-page="(date: DateValue) => pagingFunc(date, -1)" />
    
      <CalendarNext step="year" />
      <CalendarNext :next-page="(date: DateValue) => pagingFunc(date, 1)" />
    </template>
    Codemod available
    bash
    npx codemod reka-ui/remove-calendar-step-prop

Select