Skip to content
Star

PxDisplayOptions

Renders a set of configuration inputs — textarea, radio group, or text — from a displayOptions.inputs schema. Each input's value is mutated directly on the object you pass in.

Usage

Demo

Props

PropTypeDefaultDescription
displayOptionsrequiredPxDisplayOptionsSchema describing the inputs to render.

PxDisplayOptions Interface

ts
interface DisplayOptionItem {
  title: string
  value: string
}

interface DisplayOptionInput {
  title: string
  type: 'textarea' | 'radio' | 'text'
  items: DisplayOptionItem[]
  value?: string   // for radio inputs
}

interface PxDisplayOptions {
  inputs: DisplayOptionInput[]
}

NOTE

PxDisplayOptions has no v-model or emits — it mutates items[i].value (or input.value for radio groups) directly on the object you pass in. Use a ref/reactive object and read the values back from it.

Built with VitePress