<pb-actions>...</pb-actions>
<pb-context>...</pb-context>
<pb-divider />
<pb-header>This is header block</pb-header>
Props
Name | Type | Required |
---|---|---|
src |
string | Yes |
alt |
string | Yes |
Example
<pb-image src="vue.png" alt="Logo" />
Props
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
name |
string | Yes | Unique identifier of form item. It's is like <input name=""> in browser |
|
label |
string | Yes | Title of form item | |
required |
boolean | No | false | |
hint |
string | No |
Example
<pb-form-item name="content" label="Content" hint="Hint" required>
<pb-text-input placeholder="Content">
</pb-form-item>
Props
Name | Type | Required | Description |
---|---|---|---|
text |
string | Preferred | This prop is not required if have section-fields in children |
Example
<pb-section text="" />
<pb-section-fields>
<pb-text>This</pb-text>
<pb-text>Is</pb-text>
<pb-text>Section</pb-text>
<pb-text>Fields</pb-text>
</pb-section-fields>
See field named accessory
of section
<pb-section text="This is section">
<pb-section-accessory>
<pb-image src="vue.png" alt="Logo" />
</pb-section-accessory>
</pb-section>
See slack reference
Props
Name | Type | Required |
---|---|---|
url |
string | No |
style |
string | No |
Events
Name | Type | Description |
---|---|---|
click |
({ trigger_id }: { trigger_id: string }) => void | Triggers when clicked |
Example
<pb-button>Button</pb-button>
A group of PbCheckbox
Warning: PbCheckGroup can't update without uesr interaction
Props
Name | Type | Required |
---|---|---|
value |
string[] | Yes |
Example
<pb-checkbox-group :value="['option1']">
<pb-checkbox value="option1"></pb-checkbox>
</pb-checkbox-group>
Props
Name | Type | Required |
---|---|---|
value |
string | Yes |
description |
string | No |
url |
string | No |
Example
<pb-checkbox value="value">Checkbox</pb-checkbox>
A group of PbRadioButton
Warning: PbRadioGroup can't update without uesr interaction
Props
Name | Type | Required |
---|---|---|
value |
string | Yes |
Example
<pb-radio-group :value="['option1']">
<pb-radio-button value="option1"></pb-radio-button>
</pb-radio-group>
Props
Name | Type | Required |
---|---|---|
value |
string | Yes |
description |
string | No |
url |
string | No |
Example
<pb-radio-button value="value">Radio</pb-radio-button>
Props
Name | Type | Required |
---|---|---|
placeholder |
string | Yes |
value |
string | No |
Events
Name | Type | Description |
---|---|---|
input |
(value: string) => void | Triggers when value changes |
Example
<pb-date-picker value="2020-10-15" />
A PbSelectMenu allows user to select multiple items from a group of PbOption
Props
Name | Type | Required | Default Value |
---|---|---|---|
type |
'static' or 'users' or 'conversations' or 'channels' | Yes | static |
placeholder |
string | No | |
value |
string | No |
Events
Name | Type | Description |
---|---|---|
input |
(value: string) => void | Triggers when value changes |
Example
<pb-select-menu type="static">
<pb-option value="option1">Option</pb-option>
</pb-select-menu>
A plain text component for PbSectionFields
Example
<pb-text>Text</pb-text>
Warning: PbModal must be declared at the top level
Props
Name | Type | Required | Description |
---|---|---|---|
title |
string | Yes | |
submit |
string | No | Submit button text of modal |
close |
string | No | Close button text of modal |
triggerId |
string | Yes | triggerId is unique id. it's generated when button clicked |
open |
boolean | No | visibility of Modal |
onSubmit |
(value: Record<name of PbFormItem, value of PbFormItem>) | No | triggers when submit clicked. Parameter is values group of value of PbFormItem declared within the modal |
Events
Name | Type | Description |
---|---|---|
close |
() => void | Triggers when close clicked |
Example
<template>
<pb-modal :trigger-id="triggerId" @close="handleClose"></pb-modal>
<pb-button @click="handleOpen">Show Modal</pb-button>
</template>
<script>
export default defineComponent({
components: {
PbModal,
PbButton,
},
setup() {
const triggerId = ref(null);
const open = ref(false);
function handleOpen({ trigger_id }) {
triggerId.value = trigger_id;
open.value = true;
}
function handleClose() {
triggerId.value = null;
open.value = true;
}
return {
handleOpen,
handleClose,
};
},
});
</script>