Skip to content


Forward component's props without boolean casting

When you are building a wrapper for a component, in some cases you want to ignore Vue Props Boolean Casting.

You can either set default value as undefined for all the boolean field, or you can use this composable.


<script setup lang="ts">
import { useForwardProps } from 'radix-vue'

const props = defineProps<CompEmitProps>()
const forwarded = useForwardProps(props)

  <Comp v-bind="forwarded">