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">
Props
| Prop | Type | Default | Notes |
|---|
type | String | main | main, complementary, success, warning, danger, info. |
purpose | String | primary | primary, secondary, tertiary. |
size | String | md | xs, sm, md, lg. |
validateForm | Boolean | Function | false | true validates closest PForm; function may return a PForm or boolean. |
Events
| Event | Payload | Description |
|---|
click | MouseEvent | Emitted after ripple and optional form validation passes. |
Slots
| Slot | Description |
|---|
| default | Button label/content. |