Skip to content

Type Alias: RCustomFieldInputSlotArg

ts
type RCustomFieldInputSlotArg = Omit<VFieldSlot, "props" | "controlRef"> & {
  bus: RCustomFieldBus;
  props: RCustomFieldDefaultSlotProps;
};

Complete argument object passed to the default slot of RCustomField.

Extends VFieldSlot with custom field-specific properties, providing everything custom implementations need for sophisticated field behavior. Includes props, event bus, state refs, handlers, and utilities.

Key properties:

  • props: Input props for binding to custom components
  • bus: Typed event emitter for wrapper communication
  • isActive, isFocused: Reactive state computed refs
  • controlRef: Reference to the VField component
  • focus, blur: Focus management methods
  • onIntersect: Intersection observer callback

Type Declaration

NameType
busRCustomFieldBus
propsRCustomFieldDefaultSlotProps

Example

typescript
// Complete slot usage
<template #default="{ props, bus, isActive, focus, blur, onIntersect }">
  <CustomInput
    v-bind="props"
    :class="{ active: isActive }"
    @focus="focus"
    @blur="blur"
    @custom-event="() => bus.emit('focus')"
  />
</template>