Skip to content

Button

Button

PButton is the standard call-to-action component. It supports visual variants, size presets, and optional form validation hooks.

Demo

Usage

<PButton type="main" purpose="primary" size="md" @click="save">
Save
</PButton>

Props

PropTypeDefaultNotes
typeStringmainmain, complementary, success, warning, danger, info.
purposeStringprimaryprimary, secondary, tertiary.
sizeStringmdxs, sm, md, lg.
validateFormBoolean | Functionfalsetrue validates closest PForm; function may return a PForm or boolean.

Events

EventPayloadDescription
clickMouseEventEmitted after ripple and optional form validation passes.

Slots

SlotDescription
defaultButton label/content.