Code representation style fixes

pull/4503/head
Tuğçe Küçükoğlu 2023-09-22 15:54:14 +03:00
parent 11051fc020
commit e0fe133189
863 changed files with 4545 additions and 2404 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-if="!embedded" class="surface-card mb-4" style="border-radius: 10px"> <div v-if="!embedded" class="surface-card mb-4" :class="scrollable ? '' : 'relative'" style="border-radius: 10px">
<div class="flex doc-section-code-buttons surface-card align-items-center justify-content-end sticky z-1 top-0 mr-3"> <div class="flex doc-section-code-buttons surface-card align-items-center justify-content-end z-1" :style="scrollable ? { position: 'sticky', padding: '0.75rem 0.75rem 0 0' } : { position: 'absolute', top: '0.75rem', right: '0.75rem' }">
<template v-if="codeMode !== 'basic' && !hideToggleCode"> <template v-if="codeMode !== 'basic' && !hideToggleCode">
<Button <Button
:class="['p-button-rounded p-button-text p-button-plain p-0 inline-flex align-items-center justify-content-center', { 'doc-section-code-buttons-active text-primary': codeLang === 'composition' }]" :class="['p-button-rounded p-button-text p-button-plain p-0 inline-flex align-items-center justify-content-center', { 'doc-section-code-buttons-active text-primary': codeLang === 'composition' }]"
@ -76,33 +76,41 @@
></Button> ></Button>
</div> </div>
<div class="relative doc-section-code overflow-auto" style="max-height: 40rem"> <div class="relative doc-section-code overflow-auto" :style="scrollable ? { 'max-height': '40rem' } : undefined" style="border-radius: 10px">
<template v-if="codeMode === 'basic' && importCode"> <template v-if="codeMode === 'basic' && importCode">
<pre v-code.script><code>{{ code.basic }} <pre v-code.script><code>{{ code.basic }}
</code></pre> </code></pre>
</template> </template>
<template v-if="codeMode === 'basic' && !importCode"> <template v-if="codeMode === 'basic' && !importCode">
<pre v-code><code>{{ code.basic }} <pre v-code><code>
{{ code.basic }}
</code></pre> </code></pre>
</template> </template>
<template v-if="codeMode !== 'basic' && codeLang === 'options'"> <template v-if="codeMode !== 'basic' && codeLang === 'options'">
<pre v-code><code>{{ code.options }} <pre v-code><code>
{{ code.options }}
</code></pre> </code></pre>
</template> </template>
<template v-if="codeMode !== 'basic' && codeLang === 'composition'"> <template v-if="codeMode !== 'basic' && codeLang === 'composition'">
<pre v-code><code>{{ code.composition }} <pre v-code><code>
{{ code.composition }}
</code></pre> </code></pre>
</template> </template>
<template v-if="codeMode !== 'basic' && codeLang === 'data'"> <template v-if="codeMode !== 'basic' && codeLang === 'data'">
<pre v-code.json><code>{{ code.data }} <pre v-code.json><code>
{{ code.data }}
</code></pre> </code></pre>
</template> </template>
</div> </div>
<div class="h-1rem"></div> <div v-if="scrollable" class="h-1rem"></div>
</div> </div>
<div v-else id="embed"></div> <div v-else id="embed"></div>
</template> </template>
@ -152,6 +160,10 @@ export default {
embedded: { embedded: {
type: Boolean, type: Boolean,
default: false default: false
},
scrollable: {
type: Boolean,
default: false
} }
}, },
data() { data() {

View File

@ -32,7 +32,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Accordion :activeIndex="0"> basic: `
<Accordion :activeIndex="0">
<AccordionTab header="Header I"> <AccordionTab header="Header I">
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
@ -53,7 +54,8 @@ export default {
</p> </p>
</AccordionTab> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab header="Header I"> <AccordionTab header="Header I">
@ -80,7 +82,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab header="Header I"> <AccordionTab header="Header I">

View File

@ -39,7 +39,8 @@ export default {
return { return {
active: 0, active: 0,
code: { code: {
basic: `<div class="pb-3"> basic: `
<div class="pb-3">
<Button @click="active = 0" text label="Activate 1st" /> <Button @click="active = 0" text label="Activate 1st" />
<Button @click="active = 1" text class="mr-2" label="Activate 2nd" /> <Button @click="active = 1" text class="mr-2" label="Activate 2nd" />
<Button @click="active = 2" text class="mr-2" label="Activate 3rd" /> <Button @click="active = 2" text class="mr-2" label="Activate 3rd" />
@ -65,7 +66,8 @@ export default {
</p> </p>
</AccordionTab> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<div class="pb-3"> <div class="pb-3">
<Button @click="active = 0" text label="Activate 1st" /> <Button @click="active = 0" text label="Activate 1st" />
@ -105,7 +107,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="pb-3"> <div class="pb-3">
<Button @click="active = 0" text label="Activate 1st" /> <Button @click="active = 0" text label="Activate 1st" />

View File

@ -33,7 +33,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Accordion :multiple="true" :activeIndex="[0]"> basic: `
<Accordion :multiple="true" :activeIndex="[0]">
<AccordionTab header="Header I"> <AccordionTab header="Header I">
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
@ -55,7 +56,8 @@ export default {
</AccordionTab> </AccordionTab>
<AccordionTab header="Header IV" :disabled="true"> </AccordionTab> <AccordionTab header="Header IV" :disabled="true"> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Accordion :multiple="true" :activeIndex="[0]"> <Accordion :multiple="true" :activeIndex="[0]">
<AccordionTab header="Header I"> <AccordionTab header="Header I">
@ -83,7 +85,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion :multiple="true" :activeIndex="[0]"> <Accordion :multiple="true" :activeIndex="[0]">
<AccordionTab header="Header I"> <AccordionTab header="Header I">

View File

@ -22,12 +22,14 @@ export default {
{ title: 'Title 3', content: 'Content 3' } { title: 'Title 3', content: 'Content 3' }
], ],
code: { code: {
basic: `<Accordion :activeIndex="0"> basic: `
<Accordion :activeIndex="0">
<AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title"> <AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title">
<p>{{ tab.content }}</p> <p>{{ tab.content }}</p>
</AccordionTab> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title"> <AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title">
@ -50,7 +52,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title"> <AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title">

View File

@ -8,8 +8,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import Accordion from 'primevue/accordion'; basic: `
import AccordionTab from 'primevue/accordiontab';` import Accordion from 'primevue/accordion';
import AccordionTab from 'primevue/accordiontab';
`
} }
}; };
} }

View File

@ -32,7 +32,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Accordion :multiple="true" :activeIndex="[0]"> basic: `
<Accordion :multiple="true" :activeIndex="[0]">
<AccordionTab header="Header I"> <AccordionTab header="Header I">
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
@ -53,7 +54,8 @@ export default {
</p> </p>
</AccordionTab> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Accordion :multiple="true" :activeIndex="[0]"> <Accordion :multiple="true" :activeIndex="[0]">
<AccordionTab header="Header I"> <AccordionTab header="Header I">
@ -80,7 +82,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion :multiple="true" :activeIndex="[0]"> <Accordion :multiple="true" :activeIndex="[0]">
<AccordionTab header="Header I"> <AccordionTab header="Header I">

View File

@ -45,7 +45,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Accordion class="accordion-custom" :activeIndex="0"> basic: `
<Accordion class="accordion-custom" :activeIndex="0">
<AccordionTab> <AccordionTab>
<template #header> <template #header>
<i class="pi pi-calendar"></i> <i class="pi pi-calendar"></i>
@ -78,7 +79,8 @@ export default {
</p> </p>
</AccordionTab> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Accordion class="accordion-custom" :activeIndex="0"> <Accordion class="accordion-custom" :activeIndex="0">
<AccordionTab> <AccordionTab>
@ -133,7 +135,8 @@ export default {
margin: 0; margin: 0;
} }
</style>`, </style>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion class="accordion-custom" :activeIndex="0"> <Accordion class="accordion-custom" :activeIndex="0">
<AccordionTab> <AccordionTab>

View File

@ -28,7 +28,8 @@ export default {
content: `Tab ${i + 1} Content` content: `Tab ${i + 1} Content`
})), })),
code: { code: {
basic: `<Accordion :activeIndex="0"> basic: `
<Accordion :activeIndex="0">
<AccordionTab v-for="(tab, index) in tabs" :key="tab.title" :header="tab.title" <AccordionTab v-for="(tab, index) in tabs" :key="tab.title" :header="tab.title"
:pt="{ :pt="{
headerAction: ({ props, parent }) => ({ headerAction: ({ props, parent }) => ({
@ -38,7 +39,8 @@ export default {
<p>{{ tab.content }}</p> <p>{{ tab.content }}</p>
</AccordionTab> </AccordionTab>
</Accordion>`, </Accordion>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab v-for="(tab, index) in tabs" :key="tab.title" :header="tab.title" <AccordionTab v-for="(tab, index) in tabs" :key="tab.title" :header="tab.title"
@ -74,7 +76,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab v-for="(tab, index) in tabs" :key="tab.title" :header="tab.title" <AccordionTab v-for="(tab, index) in tabs" :key="tab.title" :header="tab.title"

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -62,7 +62,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Accordion :activeIndex="0"> <Accordion :activeIndex="0">
<AccordionTab header="Header I"> <AccordionTab header="Header I">

View File

@ -161,7 +161,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<label for="ac1">;Username</label> basic: `
<label for="ac1">;Username</label>
<AutoComplete inputId="ac1" /> <AutoComplete inputId="ac1" />
<span id="ac2">Email</span> <span id="ac2">Email</span>

View File

@ -15,8 +15,10 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<AutoComplete v-model="value" :suggestions="items" @complete="search" />`, basic: `
options: `<template> <AutoComplete v-model="value" :suggestions="items" @complete="search" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" /> <AutoComplete v-model="value" :suggestions="items" @complete="search" />
</div> </div>
@ -37,7 +39,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" /> <AutoComplete v-model="value" :suggestions="items" @complete="search" />
</div> </div>

View File

@ -13,8 +13,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<AutoComplete disabled placeholder="Disabled" />`, basic: `
options: `<template> <AutoComplete disabled placeholder="Disabled" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete disabled placeholder="Disabled" /> <AutoComplete disabled placeholder="Disabled" />
</div> </div>
@ -23,7 +25,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete disabled placeholder="Disabled" /> <AutoComplete disabled placeholder="Disabled" />
</div> </div>

View File

@ -18,8 +18,10 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<AutoComplete v-model="value" dropdown :suggestions="items" @complete="search" />`, basic: `
options: `<template> <AutoComplete v-model="value" dropdown :suggestions="items" @complete="search" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" dropdown :suggestions="items" @complete="search" /> <AutoComplete v-model="value" dropdown :suggestions="items" @complete="search" />
</div> </div>
@ -42,7 +44,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" dropdown :suggestions="items" @complete="search" /> <AutoComplete v-model="value" dropdown :suggestions="items" @complete="search" />
</div> </div>

View File

@ -18,11 +18,13 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<span class="p-float-label"> basic: `
<span class="p-float-label">
<AutoComplete v-model="value" inputId="ac" :suggestions="items" @complete="search" /> <AutoComplete v-model="value" inputId="ac" :suggestions="items" @complete="search" />
<label for="ac">Float Label</label> <label for="ac">Float Label</label>
</span>`, </span>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<span class="p-float-label"> <span class="p-float-label">
<AutoComplete v-model="value" inputId="ac" :suggestions="items" @complete="search" /> <AutoComplete v-model="value" inputId="ac" :suggestions="items" @complete="search" />
@ -46,7 +48,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<span class="p-float-label"> <span class="p-float-label">
<AutoComplete v-model="value" inputId="ac" :suggestions="items" @complete="search" /> <AutoComplete v-model="value" inputId="ac" :suggestions="items" @complete="search" />

View File

@ -18,8 +18,10 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<AutoComplete v-model="value" :suggestions="items" @complete="search" forceSelection />`, basic: `
options: `<template> <AutoComplete v-model="value" :suggestions="items" @complete="search" forceSelection />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" forceSelection /> <AutoComplete v-model="value" :suggestions="items" @complete="search" forceSelection />
</div> </div>
@ -40,7 +42,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" forceSelection /> <AutoComplete v-model="value" :suggestions="items" @complete="search" forceSelection />
</div> </div>

View File

@ -57,7 +57,8 @@ export default {
} }
], ],
code: { code: {
basic: `<AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="search" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Hint: type 'a'"> basic: `
<AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="search" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Hint: type 'a'">
<template #optiongroup="slotProps"> <template #optiongroup="slotProps">
<div class="flex align-items-center country-item"> <div class="flex align-items-center country-item">
<img :alt="slotProps.item.label" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\`flag flag-\${slotProps.item.code.toLowerCase()} mr-2\`" style="width: 18px" /> <img :alt="slotProps.item.label" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\`flag flag-\${slotProps.item.code.toLowerCase()} mr-2\`" style="width: 18px" />
@ -65,7 +66,8 @@ export default {
</div> </div>
</template> </template>
</AutoComplete>`, </AutoComplete>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="search" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Hint: type 'a'"> <AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="search" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Hint: type 'a'">
<template #optiongroup="slotProps"> <template #optiongroup="slotProps">
@ -139,7 +141,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="search" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Hint: type 'a'"> <AutoComplete v-model="selectedCity" :suggestions="filteredCities" @complete="search" optionLabel="label" optionGroupLabel="label" optionGroupChildren="items" placeholder="Hint: type 'a'">
<template #optiongroup="slotProps"> <template #optiongroup="slotProps">

View File

@ -8,7 +8,9 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import AutoComplete from 'primevue/autocomplete';` basic: `
import AutoComplete from 'primevue/autocomplete';
`
} }
}; };
} }

View File

@ -15,8 +15,10 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<AutoComplete v-model="value" :suggestions="items" @complete="search" class="p-invalid" />`, basic: `
options: `<template> <AutoComplete v-model="value" :suggestions="items" @complete="search" class="p-invalid" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" class="p-invalid" /> <AutoComplete v-model="value" :suggestions="items" @complete="search" class="p-invalid" />
</div> </div>
@ -37,7 +39,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" class="p-invalid" /> <AutoComplete v-model="value" :suggestions="items" @complete="search" class="p-invalid" />
</div> </div>

View File

@ -15,8 +15,10 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<AutoComplete v-model="value" multiple :suggestions="items" @complete="search" />`, basic: `
options: `<template> <AutoComplete v-model="value" multiple :suggestions="items" @complete="search" />`,
options: `
<template>
<div class="card p-fluid"> <div class="card p-fluid">
<AutoComplete v-model="value" multiple :suggestions="items" @complete="search" /> <AutoComplete v-model="value" multiple :suggestions="items" @complete="search" />
</div> </div>
@ -37,7 +39,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card p-fluid"> <div class="card p-fluid">
<AutoComplete v-model="value" multiple :suggestions="items" @complete="search" /> <AutoComplete v-model="value" multiple :suggestions="items" @complete="search" />
</div> </div>

View File

@ -21,8 +21,10 @@ export default {
selectedCountry: null, selectedCountry: null,
filteredCountries: null, filteredCountries: null,
code: { code: {
basic: `<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search" />`, basic: `
options: `<template> <AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search" /> <AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search" />
</div> </div>
@ -57,7 +59,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search" /> <AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search" />
</div> </div>

View File

@ -27,7 +27,8 @@ export default {
countries: null, countries: null,
filteredCountries: null, filteredCountries: null,
code: { code: {
basic: `<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search"> basic: `
<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search">
<template #option="slotProps"> <template #option="slotProps">
<div class="flex align-options-center"> <div class="flex align-options-center">
<img :alt="slotProps.option.name" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\`flag flag-\${slotProps.option.code.toLowerCase()} mr-2\`" style="width: 18px" /> <img :alt="slotProps.option.name" src="https://primefaces.org/cdn/primevue/images/flag/flag_placeholder.png" :class="\`flag flag-\${slotProps.option.code.toLowerCase()} mr-2\`" style="width: 18px" />
@ -35,7 +36,8 @@ export default {
</div> </div>
</template> </template>
</AutoComplete>`, </AutoComplete>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search"> <AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search">
<template #option="slotProps"> <template #option="slotProps">
@ -77,7 +79,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search"> <AutoComplete v-model="selectedCountry" optionLabel="name" :suggestions="filteredCountries" @complete="search">
<template #option="slotProps"> <template #option="slotProps">

View File

@ -19,9 +19,11 @@ export default {
selectedItem: null, selectedItem: null,
filteredItems: null, filteredItems: null,
code: { code: {
basic: `<AutoComplete v-model="selectedItem" :suggestions="filteredItems" @complete="searchItems" basic: `
<AutoComplete v-model="selectedItem" :suggestions="filteredItems" @complete="searchItems"
:virtualScrollerOptions="{ itemSize: 38 }" optionLabel="label" dropdown />`, :virtualScrollerOptions="{ itemSize: 38 }" optionLabel="label" dropdown />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedItem" :suggestions="filteredItems" @complete="searchItems" :virtualScrollerOptions="{ itemSize: 38 }" optionLabel="label" dropdown /> <AutoComplete v-model="selectedItem" :suggestions="filteredItems" @complete="searchItems" :virtualScrollerOptions="{ itemSize: 38 }" optionLabel="label" dropdown />
</div> </div>
@ -55,7 +57,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete v-model="selectedItem" :suggestions="filteredItems" @complete="searchItems" :virtualScrollerOptions="{ itemSize: 38 }" optionLabel="label" dropdown /> <AutoComplete v-model="selectedItem" :suggestions="filteredItems" @complete="searchItems" :virtualScrollerOptions="{ itemSize: 38 }" optionLabel="label" dropdown />
</div> </div>

View File

@ -44,7 +44,8 @@ export default {
return { return {
items: [], items: [],
code: { code: {
basic: `<template> basic: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<form @submit="onSubmit" class="flex flex-column gap-2"> <form @submit="onSubmit" class="flex flex-column gap-2">
<label for="ac">Value</label> <label for="ac">Value</label>
@ -54,7 +55,8 @@ export default {
</form> </form>
</div> </div>
</template>`, </template>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<form @submit="onSubmit" class="flex flex-column gap-2"> <form @submit="onSubmit" class="flex flex-column gap-2">
<label for="ac">Value</label> <label for="ac">Value</label>
@ -105,7 +107,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<form @submit="onSubmit" class="flex flex-column gap-2"> <form @submit="onSubmit" class="flex flex-column gap-2">
<label for="ac">Value</label> <label for="ac">Value</label>

View File

@ -23,7 +23,8 @@ export default {
value: '', value: '',
items: [], items: [],
code: { code: {
basic: `<AutoComplete basic: `
<AutoComplete
v-model="value" v-model="value"
:suggestions="items" :suggestions="items"
@complete="search" @complete="search"
@ -34,7 +35,8 @@ export default {
}) })
}" }"
/>`, />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete <AutoComplete
v-model="value" v-model="value"
@ -65,7 +67,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AutoComplete <AutoComplete
v-model="value" v-model="value"

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export const TRANSITIONS = {
export const TRANSITIONS = {
overlay: { overlay: {
enterFromClass: 'opacity-0 scale-75', enterFromClass: 'opacity-0 scale-75',
enterActiveClass: 'transition-transform transition-opacity duration-150 ease-in', enterActiveClass: 'transition-transform transition-opacity duration-150 ease-in',
@ -92,7 +91,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<AutoComplete v-model="value" :suggestions="items" @complete="search" /> <AutoComplete v-model="value" :suggestions="items" @complete="search" />
</div> </div>

View File

@ -20,7 +20,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<AvatarGroup> basic: `
<AvatarGroup>
<Avatar image="/images/avatar/amyelsner.png" size="large" shape="circle" /> <Avatar image="/images/avatar/amyelsner.png" size="large" shape="circle" />
<Avatar image="/images/avatar/asiyajavayant.png" size="large" shape="circle" /> <Avatar image="/images/avatar/asiyajavayant.png" size="large" shape="circle" />
<Avatar image="/images/avatar/onyamalimba.png" size="large" shape="circle" /> <Avatar image="/images/avatar/onyamalimba.png" size="large" shape="circle" />
@ -28,7 +29,8 @@ export default {
<Avatar image="/images/avatar/xuxuefeng.png" size="large" shape="circle" /> <Avatar image="/images/avatar/xuxuefeng.png" size="large" shape="circle" />
<Avatar label="+2" shape="circle" size="large" style="background-color: '#9c27b0', color: '#ffffff'" /> <Avatar label="+2" shape="circle" size="large" style="background-color: '#9c27b0', color: '#ffffff'" />
</AvatarGroup>`, </AvatarGroup>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AvatarGroup> <AvatarGroup>
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" size="large" shape="circle" /> <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" size="large" shape="circle" />
@ -44,7 +46,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<AvatarGroup> <AvatarGroup>
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" size="large" shape="circle" /> <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" size="large" shape="circle" />

View File

@ -32,7 +32,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Avatar icon="pi pi-user" class="mr-2" size="xlarge" /> basic: `
<Avatar icon="pi pi-user" class="mr-2" size="xlarge" />
<Avatar icon="pi pi-user" class="mr-2" size="large" style="background-color: #2196f3; color: #ffffff" /> <Avatar icon="pi pi-user" class="mr-2" size="large" style="background-color: #2196f3; color: #ffffff" />
<Avatar icon="pi pi-user" style="background-color: #9c27b0; color: #ffffff" /> <Avatar icon="pi pi-user" style="background-color: #9c27b0; color: #ffffff" />
@ -41,7 +42,8 @@ export default {
<Avatar icon="pi pi-user" style="background-color: #9c27b0; color: #ffffff" shape="circle" /> <Avatar icon="pi pi-user" style="background-color: #9c27b0; color: #ffffff" shape="circle" />
<Avatar v-badge="4" class="p-overlay-badge" icon="pi pi-user" size="xlarge" />`, <Avatar v-badge="4" class="p-overlay-badge" icon="pi pi-user" size="xlarge" />`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div class="flex-auto"> <div class="flex-auto">
@ -69,7 +71,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div class="flex-auto"> <div class="flex-auto">

View File

@ -30,14 +30,16 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Avatar image="/images/avatar/amyelsner.png" class="mr-2" size="xlarge" shape="circle" /> basic: `
<Avatar image="/images/avatar/amyelsner.png" class="mr-2" size="xlarge" shape="circle" />
<Avatar image="/images/avatar/asiyajavayant.png" class="mr-2" size="large" shape="circle" /> <Avatar image="/images/avatar/asiyajavayant.png" class="mr-2" size="large" shape="circle" />
<Avatar image="/images/avatar/onyamalimba.png" shape="circle" /> <Avatar image="/images/avatar/onyamalimba.png" shape="circle" />
<Avatar v-badge.danger="4" class="p-overlay-badge" image="/images/organization/walter.jpg" size="xlarge" /> <Avatar v-badge.danger="4" class="p-overlay-badge" image="/images/organization/walter.jpg" size="xlarge" />
<Avatar image="https://www.gravatar.com/avatar/05dfd4b41340d09cae045235eb0893c3?d=mp" class="flex align-items-center justify-content-center mr-2" size="xlarge" />`, <Avatar image="https://www.gravatar.com/avatar/05dfd4b41340d09cae045235eb0893c3?d=mp" class="flex align-items-center justify-content-center mr-2" size="xlarge" />`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div class="flex-auto"> <div class="flex-auto">
@ -63,7 +65,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div class="flex-auto"> <div class="flex-auto">

View File

@ -8,8 +8,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import Avatar from 'primevue/avatar'; basic: `
import AvatarGroup from 'primevue/avatargroup'; //Optional for grouping` import Avatar from 'primevue/avatar';
import AvatarGroup from 'primevue/avatargroup'; //Optional for grouping
`
} }
}; };
} }

View File

@ -32,7 +32,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Avatar label="P" class="mr-2" size="xlarge" /> basic: `
<Avatar label="P" class="mr-2" size="xlarge" />
<Avatar label="V" class="mr-2" size="large" style="background-color:#2196F3; color: #ffffff"/> <Avatar label="V" class="mr-2" size="large" style="background-color:#2196F3; color: #ffffff"/>
<Avatar label="U" class="mr-2" style="background-color:#9c27b0; color: #ffffff" /> <Avatar label="U" class="mr-2" style="background-color:#9c27b0; color: #ffffff" />
@ -41,7 +42,8 @@ export default {
<Avatar label="U" class="mr-2" style="background-color:#9c27b0; color: #ffffff" shape="circle" /> <Avatar label="U" class="mr-2" style="background-color:#9c27b0; color: #ffffff" shape="circle" />
<Avatar label="U" size="xlarge" style="background-color:#4caf4f; color: #ffffff" v-badge="4" />`, <Avatar label="U" size="xlarge" style="background-color:#4caf4f; color: #ffffff" v-badge="4" />`,
options: `<template> options: `
<template>
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div class="flex-auto"> <div class="flex-auto">
<h5>Label</h5> <h5>Label</h5>
@ -67,7 +69,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div class="flex-auto"> <div class="flex-auto">
<h5>Label</h5> <h5>Label</h5>

View File

@ -11,19 +11,22 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" basic: `
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{ :pt="{
image: { class: 'w-4rem h-4rem' } image: { class: 'w-4rem h-4rem' }
}" }"
/>`, />`,
options: `<template> options: `
<template>
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{ :pt="{
image: { class: 'w-4rem h-4rem' } image: { class: 'w-4rem h-4rem' }
}" }"
/> />
</template>`, </template>`,
composition: `<template> composition: `
<template>
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{ :pt="{
image: { class: 'w-4rem h-4rem' } image: { class: 'w-4rem h-4rem' }

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export default {
export default {
avatar: { avatar: {
root: ({ props, parent }) => ({ root: ({ props, parent }) => ({
class: [ class: [
@ -45,7 +44,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap gap-5"> <div class="flex flex-wrap gap-5">
<div> <div>

View File

@ -13,8 +13,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Badge value="2"></Badge>`, basic: `
options: `<template> <Badge value="2"></Badge>`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Badge value="2"></Badge> <Badge value="2"></Badge>
</div> </div>
@ -23,7 +25,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Badge value="2"></Badge> <Badge value="2"></Badge>
</div> </div>

View File

@ -14,9 +14,11 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button type="button" label="Emails" badge="8" /> basic: `
<Button type="button" label="Emails" badge="8" />
<Button type="button" label="Messages" icon="pi pi-users" severity="warning" badge="8" badgeClass="p-badge-danger" />`, <Button type="button" label="Messages" icon="pi pi-users" severity="warning" badge="8" badgeClass="p-badge-danger" />`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap justify-content-center gap-2"> <div class="card flex flex-wrap justify-content-center gap-2">
<Button type="button" label="Emails" badge="8" /> <Button type="button" label="Emails" badge="8" />
<Button type="button" label="Messages" icon="pi pi-users" severity="warning" badge="8" badgeClass="p-badge-danger" /> <Button type="button" label="Messages" icon="pi pi-users" severity="warning" badge="8" badgeClass="p-badge-danger" />
@ -26,7 +28,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap justify-content-center gap-2"> <div class="card flex flex-wrap justify-content-center gap-2">
<Button type="button" label="Emails" badge="8" /> <Button type="button" label="Emails" badge="8" />
<Button type="button" label="Messages" icon="pi pi-users" severity="warning" badge="8" badgeClass="p-badge-danger" /> <Button type="button" label="Messages" icon="pi pi-users" severity="warning" badge="8" badgeClass="p-badge-danger" />

View File

@ -8,13 +8,15 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `// import as component basic: `
// import as component
import Badge from 'primevue/badge'; import Badge from 'primevue/badge';
// import as directive // import as directive
import BadgeDirective from 'primevue/badgedirective'; import BadgeDirective from 'primevue/badgedirective';
app.directive('badge', BadgeDirective);` app.directive('badge', BadgeDirective);
`
} }
}; };
} }

View File

@ -15,10 +15,12 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<i v-badge="2" class="pi pi-bell p-overlay-badge" style="font-size: 2rem" /> basic: `
<i v-badge="2" class="pi pi-bell p-overlay-badge" style="font-size: 2rem" />
<i v-badge.danger="'5+'" class="pi pi-calendar p-overlay-badge" style="font-size: 2rem" /> <i v-badge.danger="'5+'" class="pi pi-calendar p-overlay-badge" style="font-size: 2rem" />
<i v-badge.danger class="pi pi-envelope p-overlay-badge" style="font-size: 2rem" />`, <i v-badge.danger class="pi pi-envelope p-overlay-badge" style="font-size: 2rem" />`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap justify-content-center gap-4"> <div class="card flex flex-wrap justify-content-center gap-4">
<i v-badge="2" class="pi pi-bell p-overlay-badge" style="font-size: 2rem" /> <i v-badge="2" class="pi pi-bell p-overlay-badge" style="font-size: 2rem" />
<i v-badge.danger="'5+'" class="pi pi-calendar p-overlay-badge" style="font-size: 2rem" /> <i v-badge.danger="'5+'" class="pi pi-calendar p-overlay-badge" style="font-size: 2rem" />
@ -29,7 +31,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap justify-content-center gap-4"> <div class="card flex flex-wrap justify-content-center gap-4">
<i v-badge="2" class="pi pi-bell p-overlay-badge" style="font-size: 2rem" /> <i v-badge="2" class="pi pi-bell p-overlay-badge" style="font-size: 2rem" />
<i v-badge.danger="'5+'" class="pi pi-calendar p-overlay-badge" style="font-size: 2rem" /> <i v-badge.danger="'5+'" class="pi pi-calendar p-overlay-badge" style="font-size: 2rem" />

View File

@ -17,12 +17,14 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Badge value="2"></Badge> basic: `
<Badge value="2"></Badge>
<Badge value="8" severity="success"></Badge> <Badge value="8" severity="success"></Badge>
<Badge value="4" severity="info"></Badge> <Badge value="4" severity="info"></Badge>
<Badge value="12" severity="warning"></Badge> <Badge value="12" severity="warning"></Badge>
<Badge value="3" severity="danger"></Badge>`, <Badge value="3" severity="danger"></Badge>`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap justify-content-center gap-2"> <div class="card flex flex-wrap justify-content-center gap-2">
<Badge value="2"></Badge> <Badge value="2"></Badge>
<Badge value="8" severity="success"></Badge> <Badge value="8" severity="success"></Badge>
@ -35,7 +37,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap justify-content-center gap-2"> <div class="card flex flex-wrap justify-content-center gap-2">
<Badge value="2"></Badge> <Badge value="2"></Badge>
<Badge value="8" severity="success"></Badge> <Badge value="8" severity="success"></Badge>

View File

@ -15,10 +15,12 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Badge value="6" size="xlarge" severity="success"></Badge> basic: `
<Badge value="6" size="xlarge" severity="success"></Badge>
<Badge value="4" size="large" severity="warning"></Badge> <Badge value="4" size="large" severity="warning"></Badge>
<Badge value="2"></Badge>`, <Badge value="2"></Badge>`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap justify-content-center align-items-end gap-2"> <div class="card flex flex-wrap justify-content-center align-items-end gap-2">
<Badge value="6" size="xlarge" severity="success"></Badge> <Badge value="6" size="xlarge" severity="success"></Badge>
<Badge value="4" size="large" severity="warning"></Badge> <Badge value="4" size="large" severity="warning"></Badge>
@ -29,7 +31,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap justify-content-center align-items-end gap-2"> <div class="card flex flex-wrap justify-content-center align-items-end gap-2">
<Badge value="6" size="xlarge" severity="success"></Badge> <Badge value="6" size="xlarge" severity="success"></Badge>
<Badge value="4" size="large" severity="warning"></Badge> <Badge value="4" size="large" severity="warning"></Badge>

View File

@ -44,7 +44,8 @@ export default {
}" }"
class="pi pi-calendar text-4xl" class="pi pi-calendar text-4xl"
/>`, />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center align-items-center gap-2"> <div class="card flex justify-content-center align-items-center gap-2">
// component // component
<Badge <Badge
@ -66,7 +67,8 @@ export default {
/> />
</div> </div>
</template>`, </template>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center align-items-center gap-2"> <div class="card flex justify-content-center align-items-center gap-2">
// component // component
<Badge <Badge

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export default {
export default {
directives: { directives: {
badge: { badge: {
root: ({ context }) => ({ root: ({ context }) => ({
@ -65,7 +64,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap justify-center gap-2"> <div class="card flex flex-wrap justify-center gap-2">
<Badge value="2"></Badge> <Badge value="2"></Badge>
<Badge value="8" severity="success"></Badge> <Badge value="8" severity="success"></Badge>

View File

@ -25,7 +25,8 @@ export default {
return { return {
blocked: false, blocked: false,
code: { code: {
basic: `<div class="mb-3"> basic: `
<div class="mb-3">
<Button label="Block" @click="blocked = true" class="mr-2"></Button> <Button label="Block" @click="blocked = true" class="mr-2"></Button>
<Button label="Unblock" @click="blocked = false"></Button> <Button label="Unblock" @click="blocked = false"></Button>
</div> </div>
@ -37,7 +38,8 @@ export default {
</p> </p>
</Panel> </Panel>
</BlockUI>`, </BlockUI>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<div class="mb-3"> <div class="mb-3">
<Button label="Block" @click="blocked = true" class="mr-2"></Button> <Button label="Block" @click="blocked = true" class="mr-2"></Button>
@ -63,7 +65,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="mb-3"> <div class="mb-3">
<Button label="Block" @click="blocked = true" class="mr-2"></Button> <Button label="Block" @click="blocked = true" class="mr-2"></Button>

View File

@ -15,9 +15,11 @@ export default {
return { return {
blocked: false, blocked: false,
code: { code: {
basic: `<BlockUI :blocked="blocked" fullScreen /> basic: `
<BlockUI :blocked="blocked" fullScreen />
<Button label="Block" @click="blocked = true" />`, <Button label="Block" @click="blocked = true" />`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<BlockUI :blocked="blocked" fullScreen /> <BlockUI :blocked="blocked" fullScreen />
<Button label="Block" @click="blockDocument" /> <Button label="Block" @click="blockDocument" />
@ -42,7 +44,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<BlockUI :blocked="blocked" fullScreen /> <BlockUI :blocked="blocked" fullScreen />
<Button label="Block" @click="blockDocument" /> <Button label="Block" @click="blockDocument" />

View File

@ -8,7 +8,9 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import BlockUI from 'primevue/blockui';` basic: `
import BlockUI from 'primevue/blockui';
`
} }
}; };
} }

View File

@ -21,13 +21,15 @@ export default {
return { return {
blocked: false, blocked: false,
code: { code: {
basic: `<BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }"> basic: `
<BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
<p class="m-0"> <p class="m-0">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p> </p>
</BlockUI>`, </BlockUI>`,
options: `<template> options: `
<template>
<BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }"> <BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
<p class="m-0"> <p class="m-0">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
@ -35,7 +37,8 @@ export default {
</p> </p>
</BlockUI> </BlockUI>
</template>`, </template>`,
composition: `<template> composition: `
<template>
<BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }"> <BlockUI :blocked="blocked" :pt="{ root: { class: 'surface-ground p-2 border-round-sm' } }">
<p class="m-0"> <p class="m-0">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export default {
export default {
blockui: { blockui: {
root: 'relative', root: 'relative',
mask: 'bg-black/40' mask: 'bg-black/40'
@ -25,7 +24,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="mb-3"> <div class="mb-3">
<Button label="Block" @click="blocked = true" class="mr-2"></Button> <Button label="Block" @click="blocked = true" class="mr-2"></Button>

View File

@ -18,8 +18,10 @@ export default {
}, },
items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }], items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }],
code: { code: {
basic: `<Breadcrumb :home="home" :model="items" />`, basic: `
options: `<template> <Breadcrumb :home="home" :model="items" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items" /> <Breadcrumb :home="home" :model="items" />
</div> </div>
@ -44,7 +46,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items" /> <Breadcrumb :home="home" :model="items" />
</div> </div>

View File

@ -8,7 +8,9 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import Breadcrumb from 'primevue/breadcrumb';` basic: `
import Breadcrumb from 'primevue/breadcrumb';
`
} }
}; };
} }

View File

@ -34,7 +34,8 @@ export default {
}, },
items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }], items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }],
code: { code: {
basic: `<Breadcrumb :home="home" :model="items"> basic: `
<Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }"> <template #item="{ label, item, props }">
<router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom> <router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom>
<a :href="routerProps.href" v-bind="props.action"> <a :href="routerProps.href" v-bind="props.action">
@ -48,7 +49,8 @@ export default {
</a> </a>
</template> </template>
</Breadcrumb>`, </Breadcrumb>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items"> <Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }"> <template #item="{ label, item, props }">
@ -86,7 +88,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items"> <Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }"> <template #item="{ label, item, props }">

View File

@ -21,14 +21,16 @@ export default {
home: { icon: 'pi pi-home', url: 'https://primevue.org/' }, home: { icon: 'pi pi-home', url: 'https://primevue.org/' },
items: [{ icon: 'pi pi-sitemap' }, { icon: 'pi pi-book' }, { icon: 'pi pi-wallet' }, { icon: 'pi pi-shopping-bag' }, { icon: 'pi pi-calculator' }], items: [{ icon: 'pi pi-sitemap' }, { icon: 'pi pi-book' }, { icon: 'pi pi-wallet' }, { icon: 'pi pi-shopping-bag' }, { icon: 'pi pi-calculator' }],
code: { code: {
basic: `<Breadcrumb :home="home" :model="items"> basic: `
<Breadcrumb :home="home" :model="items">
<template #item="item"> <template #item="item">
<a :class="item.class"> <a :class="item.class">
<span :class="item.icon"></span> <span :class="item.icon"></span>
</a> </a>
</template> </template>
</Breadcrumb>`, </Breadcrumb>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items"> <Breadcrumb :home="home" :model="items">
<template #item="{item}"> <template #item="{item}">
@ -50,7 +52,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items"> <Breadcrumb :home="home" :model="items">
<template #item="{item}"> <template #item="{item}">

View File

@ -25,7 +25,8 @@ export default {
}, },
items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }], items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }],
code: { code: {
basic: `<Breadcrumb :home="home" :model="items" basic: `
<Breadcrumb :home="home" :model="items"
:pt="{ :pt="{
root: { class: 'surface-ground' }, root: { class: 'surface-ground' },
label: ({ props }) => ({ label: ({ props }) => ({
@ -33,7 +34,8 @@ export default {
}) })
}" }"
/>`, />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items" <Breadcrumb :home="home" :model="items"
:pt="{ :pt="{
@ -65,7 +67,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items" <Breadcrumb :home="home" :model="items"
:pt="{ :pt="{

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export default {
export default {
breadcrumb: { breadcrumb: {
root: { root: {
class: ['overflow-x-auto', 'bg-white dark:bg-gray-900 border border-gray-300 dark:border-blue-900/40 rounded-md p-4'] class: ['overflow-x-auto', 'bg-white dark:bg-gray-900 border border-gray-300 dark:border-blue-900/40 rounded-md p-4']
@ -38,7 +37,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<Breadcrumb :home="home" :model="items" /> <Breadcrumb :home="home" :model="items" />
</div> </div>

View File

@ -40,7 +40,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button icon="pi pi-check" aria-label="Submit" /> basic: `
<Button icon="pi pi-check" aria-label="Submit" />
<Button icon="pi pi-check" label="Submit" /> <Button icon="pi pi-check" label="Submit" />

View File

@ -14,9 +14,11 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button type="button" label="Emails" badge="8" /> basic: `
<Button type="button" label="Emails" badge="8" />
<Button type="button" label="Messages" icon="pi pi-users" badge="8" badgeClass="p-badge-danger" outlined />`, <Button type="button" label="Messages" icon="pi pi-users" badge="8" badgeClass="p-badge-danger" outlined />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button type="button" label="Emails" badge="8" /> <Button type="button" label="Emails" badge="8" />
<Button type="button" label="Messages" icon="pi pi-users" badge="8" badgeClass="p-badge-danger" outlined /> <Button type="button" label="Messages" icon="pi pi-users" badge="8" badgeClass="p-badge-danger" outlined />
@ -25,7 +27,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button type="button" label="Emails" badge="8" /> <Button type="button" label="Emails" badge="8" />
<Button type="button" label="Messages" icon="pi pi-users" badge="8" badgeClass="p-badge-danger" outlined /> <Button type="button" label="Messages" icon="pi pi-users" badge="8" badgeClass="p-badge-danger" outlined />

View File

@ -13,8 +13,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Submit" />`, basic: `
options: `<template> <Button label="Submit" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button label="Submit" /> <Button label="Submit" />
</div> </div>
@ -22,7 +24,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button label="Submit" /> <Button label="Submit" />
</div> </div>

View File

@ -17,12 +17,14 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<span class="p-buttonset"> basic: `
<span class="p-buttonset">
<Button label="Save" icon="pi pi-check" /> <Button label="Save" icon="pi pi-check" />
<Button label="Delete" icon="pi pi-trash" /> <Button label="Delete" icon="pi pi-trash" />
<Button label="Cancel" icon="pi pi-times" /> <Button label="Cancel" icon="pi pi-times" />
</span>`, </span>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<span class="p-buttonset"> <span class="p-buttonset">
<Button label="Save" icon="pi pi-check" /> <Button label="Save" icon="pi pi-check" />
@ -34,7 +36,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<span class="p-buttonset"> <span class="p-buttonset">
<Button label="Save" icon="pi pi-check" /> <Button label="Save" icon="pi pi-check" />

View File

@ -13,8 +13,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Submit" disabled />`, basic: `
options: `<template> <Button label="Submit" disabled />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button label="Submit" disabled /> <Button label="Submit" disabled />
</div> </div>
@ -22,7 +24,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button label="Submit" disabled /> <Button label="Submit" disabled />
</div> </div>

View File

@ -61,7 +61,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button icon="pi pi-check" aria-label="Filter" /> basic: `
<Button icon="pi pi-check" aria-label="Filter" />
<Button icon="pi pi-bookmark" severity="secondary" aria-label="Bookmark" /> <Button icon="pi pi-bookmark" severity="secondary" aria-label="Bookmark" />
<Button icon="pi pi-search" severity="success" aria-label="Search" /> <Button icon="pi pi-search" severity="success" aria-label="Search" />
<Button icon="pi pi-user" severity="info" aria-label="User" /> <Button icon="pi pi-user" severity="info" aria-label="User" />
@ -100,7 +101,8 @@ export default {
<Button icon="pi pi-bell" severity="warning" text rounded aria-label="Notification" /> <Button icon="pi pi-bell" severity="warning" text rounded aria-label="Notification" />
<Button icon="pi pi-heart" severity="help" text rounded aria-label="Favorite" /> <Button icon="pi pi-heart" severity="help" text rounded aria-label="Favorite" />
<Button icon="pi pi-times" severity="danger" text rounded aria-label="Cancel" />`, <Button icon="pi pi-times" severity="danger" text rounded aria-label="Cancel" />`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap justify-content-center gap-3 mb-4"> <div class="flex flex-wrap justify-content-center gap-3 mb-4">
<Button icon="pi pi-check" aria-label="Filter" /> <Button icon="pi pi-check" aria-label="Filter" />
@ -156,7 +158,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<div class="flex flex-wrap justify-content-center gap-3 mb-4"> <div class="flex flex-wrap justify-content-center gap-3 mb-4">
<Button icon="pi pi-check" aria-label="Filter" /> <Button icon="pi pi-check" aria-label="Filter" />

View File

@ -15,10 +15,12 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button icon="pi pi-check" aria-label="Submit" /> basic: `
<Button icon="pi pi-check" aria-label="Submit" />
<Button label="Submit" icon="pi pi-check" /> <Button label="Submit" icon="pi pi-check" />
<Button label="Submit" icon="pi pi-check" iconPos="right" />`, <Button label="Submit" icon="pi pi-check" iconPos="right" />`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap gap-3 justify-content-center"> <div class="card flex flex-wrap gap-3 justify-content-center">
<Button icon="pi pi-check" aria-label="Submit" /> <Button icon="pi pi-check" aria-label="Submit" />
<Button label="Submit" icon="pi pi-check" /> <Button label="Submit" icon="pi pi-check" />
@ -28,7 +30,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap gap-3 justify-content-center"> <div class="card flex flex-wrap gap-3 justify-content-center">
<Button icon="pi pi-check" aria-label="Submit" /> <Button icon="pi pi-check" aria-label="Submit" />
<Button label="Submit" icon="pi pi-check" /> <Button label="Submit" icon="pi pi-check" />

View File

@ -8,7 +8,9 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import Button from 'primevue/button';` basic: `
import Button from 'primevue/button';
`
} }
}; };
} }

View File

@ -13,8 +13,10 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Link" link />`, basic: `
options: `<template> <Button label="Link" link />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button label="Link" link /> <Button label="Link" link />
</div> </div>
@ -22,7 +24,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button label="Link" link /> <Button label="Link" link />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
loading: false, loading: false,
code: { code: {
basic: `<Button type="button" label="Search" icon="pi pi-search" :loading="loading" @click="load" />`, basic: `
options: `<template> <Button type="button" label="Search" icon="pi pi-search" :loading="loading" @click="load" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button type="button" label="Search" icon="pi pi-search" :loading="loading" @click="load" /> <Button type="button" label="Search" icon="pi pi-search" :loading="loading" @click="load" />
</div> </div>
@ -38,7 +40,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button type="button" label="Search" icon="pi pi-search" :loading="loading" @click="load" /> <Button type="button" label="Search" icon="pi pi-search" :loading="loading" @click="load" />
</div> </div>

View File

@ -19,14 +19,16 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Primary" outlined /> basic: `
<Button label="Primary" outlined />
<Button label="Secondary" severity="secondary" outlined /> <Button label="Secondary" severity="secondary" outlined />
<Button label="Success" severity="success" outlined /> <Button label="Success" severity="success" outlined />
<Button label="Info" severity="info" outlined /> <Button label="Info" severity="info" outlined />
<Button label="Warning" severity="warning" outlined /> <Button label="Warning" severity="warning" outlined />
<Button label="Help" severity="help" outlined /> <Button label="Help" severity="help" outlined />
<Button label="Danger" severity="danger" outlined />`, <Button label="Danger" severity="danger" outlined />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" outlined /> <Button label="Primary" outlined />
<Button label="Secondary" severity="secondary" outlined /> <Button label="Secondary" severity="secondary" outlined />
@ -40,7 +42,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" outlined /> <Button label="Primary" outlined />
<Button label="Secondary" severity="secondary" outlined /> <Button label="Secondary" severity="secondary" outlined />

View File

@ -19,14 +19,16 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Primary" raised /> basic: `
<Button label="Primary" raised />
<Button label="Secondary" severity="secondary" raised /> <Button label="Secondary" severity="secondary" raised />
<Button label="Success" severity="success" raised /> <Button label="Success" severity="success" raised />
<Button label="Info" severity="info" raised /> <Button label="Info" severity="info" raised />
<Button label="Warning" severity="warning" raised /> <Button label="Warning" severity="warning" raised />
<Button label="Help" severity="help" raised /> <Button label="Help" severity="help" raised />
<Button label="Danger" severity="danger" raised />`, <Button label="Danger" severity="danger" raised />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" raised /> <Button label="Primary" raised />
<Button label="Secondary" severity="secondary" raised /> <Button label="Secondary" severity="secondary" raised />
@ -40,7 +42,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" raised /> <Button label="Primary" raised />
<Button label="Secondary" severity="secondary" raised /> <Button label="Secondary" severity="secondary" raised />

View File

@ -20,7 +20,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Primary" text raised /> basic: `
<Button label="Primary" text raised />
<Button label="Secondary" severity="secondary" text raised /> <Button label="Secondary" severity="secondary" text raised />
<Button label="Success" severity="success" text raised /> <Button label="Success" severity="success" text raised />
<Button label="Info" severity="info" text raised /> <Button label="Info" severity="info" text raised />
@ -28,7 +29,8 @@ export default {
<Button label="Help" severity="help" text raised /> <Button label="Help" severity="help" text raised />
<Button label="Danger" severity="danger" text raised /> <Button label="Danger" severity="danger" text raised />
<Button label="Plain" plain text raised />`, <Button label="Plain" plain text raised />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" text raised /> <Button label="Primary" text raised />
<Button label="Secondary" severity="secondary" text raised /> <Button label="Secondary" severity="secondary" text raised />
@ -43,7 +45,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" text raised /> <Button label="Primary" text raised />
<Button label="Secondary" severity="secondary" text raised /> <Button label="Secondary" severity="secondary" text raised />

View File

@ -19,14 +19,16 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Primary" rounded /> basic: `
<Button label="Primary" rounded />
<Button label="Secondary" severity="secondary" rounded /> <Button label="Secondary" severity="secondary" rounded />
<Button label="Success" severity="success" rounded /> <Button label="Success" severity="success" rounded />
<Button label="Info" severity="info" rounded /> <Button label="Info" severity="info" rounded />
<Button label="Warning" severity="warning" rounded /> <Button label="Warning" severity="warning" rounded />
<Button label="Help" severity="help" rounded /> <Button label="Help" severity="help" rounded />
<Button label="Danger" severity="danger" rounded />`, <Button label="Danger" severity="danger" rounded />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" rounded /> <Button label="Primary" rounded />
<Button label="Secondary" severity="secondary" rounded /> <Button label="Secondary" severity="secondary" rounded />
@ -40,7 +42,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" rounded /> <Button label="Primary" rounded />
<Button label="Secondary" severity="secondary" rounded /> <Button label="Secondary" severity="secondary" rounded />

View File

@ -19,14 +19,16 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Primary" /> basic: `
<Button label="Primary" />
<Button label="Secondary" severity="secondary" /> <Button label="Secondary" severity="secondary" />
<Button label="Success" severity="success" /> <Button label="Success" severity="success" />
<Button label="Info" severity="info" /> <Button label="Info" severity="info" />
<Button label="Warning" severity="warning" /> <Button label="Warning" severity="warning" />
<Button label="Help" severity="help" /> <Button label="Help" severity="help" />
<Button label="Danger" severity="danger" />`, <Button label="Danger" severity="danger" />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" /> <Button label="Primary" />
<Button label="Secondary" severity="secondary" /> <Button label="Secondary" severity="secondary" />
@ -40,7 +42,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" /> <Button label="Primary" />
<Button label="Secondary" severity="secondary" /> <Button label="Secondary" severity="secondary" />

View File

@ -15,10 +15,12 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Small" icon="pi pi-check" size="small" /> basic: `
<Button label="Small" icon="pi pi-check" size="small" />
<Button label="Normal" icon="pi pi-check" /> <Button label="Normal" icon="pi pi-check" />
<Button label="Large" icon="pi pi-check" size="large" />`, <Button label="Large" icon="pi pi-check" size="large" />`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap align-items-center justify-content-center gap-3"> <div class="card flex flex-wrap align-items-center justify-content-center gap-3">
<Button label="Small" icon="pi pi-check" size="small" /> <Button label="Small" icon="pi pi-check" size="small" />
<Button label="Normal" icon="pi pi-check" /> <Button label="Normal" icon="pi pi-check" />
@ -28,7 +30,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap align-items-center justify-content-center gap-3"> <div class="card flex flex-wrap align-items-center justify-content-center gap-3">
<Button label="Small" icon="pi pi-check" size="small" /> <Button label="Small" icon="pi pi-check" size="small" />
<Button label="Normal" icon="pi pi-check" /> <Button label="Normal" icon="pi pi-check" />

View File

@ -15,10 +15,12 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button class="bg-bluegray-600 hover:bg-bluegray-400 border-bluegray-700"> basic: `
<Button class="bg-bluegray-600 hover:bg-bluegray-400 border-bluegray-700">
<img alt="logo" src="/images/logo.svg" class="h-2rem" /> <img alt="logo" src="/images/logo.svg" class="h-2rem" />
</Button>`, </Button>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button class="bg-bluegray-600 hover:bg-bluegray-400 border-bluegray-700"> <Button class="bg-bluegray-600 hover:bg-bluegray-400 border-bluegray-700">
<img alt="logo" src="https://primefaces.org/cdn/primevue/images/primevue-logo-light.svg" class="h-2rem" /> <img alt="logo" src="https://primefaces.org/cdn/primevue/images/primevue-logo-light.svg" class="h-2rem" />
@ -28,7 +30,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Button class="bg-bluegray-600 hover:bg-bluegray-400 border-bluegray-700"> <Button class="bg-bluegray-600 hover:bg-bluegray-400 border-bluegray-700">
<img alt="logo" src="https://primefaces.org/cdn/primevue/images/primevue-logo-light.svg" class="h-2rem" /> <img alt="logo" src="https://primefaces.org/cdn/primevue/images/primevue-logo-light.svg" class="h-2rem" />

View File

@ -20,7 +20,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Primary" text /> basic: `
<Button label="Primary" text />
<Button label="Secondary" severity="secondary" text /> <Button label="Secondary" severity="secondary" text />
<Button label="Success" severity="success" text /> <Button label="Success" severity="success" text />
<Button label="Info" severity="info" text /> <Button label="Info" severity="info" text />
@ -28,7 +29,8 @@ export default {
<Button label="Help" severity="help" text /> <Button label="Help" severity="help" text />
<Button label="Danger" severity="danger" text /> <Button label="Danger" severity="danger" text />
<Button label="Plain" plain text />`, <Button label="Plain" plain text />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" text /> <Button label="Primary" text />
<Button label="Secondary" severity="secondary" text /> <Button label="Secondary" severity="secondary" text />
@ -43,7 +45,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center flex-wrap gap-3"> <div class="card flex justify-content-center flex-wrap gap-3">
<Button label="Primary" text /> <Button label="Primary" text />
<Button label="Secondary" severity="secondary" text /> <Button label="Secondary" severity="secondary" text />

View File

@ -11,12 +11,14 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Button label="Submit" icon="pi pi-check" basic: `
<Button label="Submit" icon="pi pi-check"
:pt="{ :pt="{
root: { class: 'bg-indigo-600 border-indigo-600' } root: { class: 'bg-indigo-600 border-indigo-600' }
}" }"
/>`, />`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap gap-3 justify-content-center"> <div class="card flex flex-wrap gap-3 justify-content-center">
<Button label="Submit" icon="pi pi-check" <Button label="Submit" icon="pi pi-check"
:pt="{ :pt="{
@ -25,7 +27,8 @@ export default {
/> />
</div> </div>
</template>`, </template>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap gap-3 justify-content-center"> <div class="card flex flex-wrap gap-3 justify-content-center">
<Button label="Submit" icon="pi pi-check" <Button label="Submit" icon="pi pi-check"
:pt="{ :pt="{

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export default {
export default {
button: { button: {
root: ({ props, context }) => ({ root: ({ props, context }) => ({
class: [ class: [
@ -94,7 +93,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card flex justify-center flex-wrap gap-3"> <div class="card flex justify-center flex-wrap gap-3">
<Button label="Primary" /> <Button label="Primary" />
<Button label="Secondary" severity="secondary" /> <Button label="Secondary" severity="secondary" />

View File

@ -195,7 +195,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<label for="date1">Date</label> basic: `
<label for="date1">Date</label>
<Calendar inputId="date1" /> <Calendar inputId="date1" />
<span id="date2">Date</span> <span id="date2">Date</span>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" />`, basic: `
options: `<template> <Calendar v-model="date" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" /> <Calendar v-model="date" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" /> <Calendar v-model="date" />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" showButtonBar />`, basic: `
options: `<template> <Calendar v-model="date" showButtonBar />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" showButtonBar /> <Calendar v-model="date" showButtonBar />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" showButtonBar /> <Calendar v-model="date" showButtonBar />
</div> </div>

View File

@ -19,13 +19,15 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date"> basic: `
<Calendar v-model="date">
<template #date="slotProps"> <template #date="slotProps">
<strong v-if="slotProps.date.day > 10 && slotProps.date.day < 15" style="text-decoration: line-through">{{ slotProps.date.day }}</strong> <strong v-if="slotProps.date.day > 10 && slotProps.date.day < 15" style="text-decoration: line-through">{{ slotProps.date.day }}</strong>
<template v-else>{{ slotProps.date.day }}</template> <template v-else>{{ slotProps.date.day }}</template>
</template> </template>
</Calendar>`, </Calendar>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date"> <Calendar v-model="date">
<template #date="slotProps"> <template #date="slotProps">
@ -45,7 +47,8 @@ export default {
} }
} }
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date"> <Calendar v-model="date">
<template #date="slotProps"> <template #date="slotProps">

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" disabled />`, basic: `
options: `<template> <Calendar v-model="date" disabled />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" disabled /> <Calendar v-model="date" disabled />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" disabled /> <Calendar v-model="date" disabled />
</div> </div>

View File

@ -17,11 +17,13 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<span class="p-float-label"> basic: `
<span class="p-float-label">
<Calendar v-model="date" inputId="birth_date" /> <Calendar v-model="date" inputId="birth_date" />
<label for="birth_date">Birth Date</label> <label for="birth_date">Birth Date</label>
</span>`, </span>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<span class="p-float-label"> <span class="p-float-label">
<Calendar v-model="date" inputId="birth_date" /> <Calendar v-model="date" inputId="birth_date" />
@ -39,7 +41,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<span class="p-float-label"> <span class="p-float-label">
<Calendar v-model="date" inputId="birth_date" /> <Calendar v-model="date" inputId="birth_date" />

View File

@ -33,8 +33,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" dateFormat="dd/mm/yy" />`, basic: `
options: `<template> <Calendar v-model="date" dateFormat="dd/mm/yy" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" dateFormat="dd/mm/yy" /> <Calendar v-model="date" dateFormat="dd/mm/yy" />
</div> </div>
@ -49,7 +51,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" dateFormat="dd/mm/yy" /> <Calendar v-model="date" dateFormat="dd/mm/yy" />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" showIcon />`, basic: `
options: `<template> <Calendar v-model="date" showIcon />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" showIcon /> <Calendar v-model="date" showIcon />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" showIcon /> <Calendar v-model="date" showIcon />
</div> </div>

View File

@ -8,7 +8,9 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import Calendar from 'primevue/calendar';` basic: `
import Calendar from 'primevue/calendar';
`
} }
}; };
} }

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" inline showWeek />`, basic: `
options: `<template> <Calendar v-model="date" inline showWeek />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" inline showWeek /> <Calendar v-model="date" inline showWeek />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" inline showWeek /> <Calendar v-model="date" inline showWeek />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" class="p-invalid" />`, basic: `
options: `<template> <Calendar v-model="date" class="p-invalid" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" class="p-invalid" /> <Calendar v-model="date" class="p-invalid" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" class="p-invalid" /> <Calendar v-model="date" class="p-invalid" />
</div> </div>

View File

@ -16,8 +16,10 @@ export default {
minDate: null, minDate: null,
maxDate: null, maxDate: null,
code: { code: {
basic: `<Calendar v-model="date" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />`, basic: `
options: `<template> <Calendar v-model="date" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" :minDate="minDate" :maxDate="maxDate" :manualInput="false" /> <Calendar v-model="date" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
</div> </div>
@ -50,7 +52,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" :minDate="minDate" :maxDate="maxDate" :manualInput="false" /> <Calendar v-model="date" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" view="month" dateFormat="mm/yy" />`, basic: `
options: `<template> <Calendar v-model="date" view="month" dateFormat="mm/yy" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" view="month" dateFormat="mm/yy" /> <Calendar v-model="date" view="month" dateFormat="mm/yy" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" view="month" dateFormat="mm/yy" /> <Calendar v-model="date" view="month" dateFormat="mm/yy" />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
dates: null, dates: null,
code: { code: {
basic: `<Calendar v-model="dates" selectionMode="multiple" :manualInput="false" />`, basic: `
options: `<template> <Calendar v-model="dates" selectionMode="multiple" :manualInput="false" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="dates" selectionMode="multiple" :manualInput="false" /> <Calendar v-model="dates" selectionMode="multiple" :manualInput="false" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="dates" selectionMode="multiple" :manualInput="false" /> <Calendar v-model="dates" selectionMode="multiple" :manualInput="false" />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" :numberOfMonths="2" />`, basic: `
options: `<template> <Calendar v-model="date" :numberOfMonths="2" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" :numberOfMonths="2" /> <Calendar v-model="date" :numberOfMonths="2" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" :numberOfMonths="2" /> <Calendar v-model="date" :numberOfMonths="2" />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
dates: null, dates: null,
code: { code: {
basic: `<Calendar v-model="dates" selectionMode="range" :manualInput="false" />`, basic: `
options: `<template> <Calendar v-model="dates" selectionMode="range" :manualInput="false" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="dates" selectionMode="range" :manualInput="false" /> <Calendar v-model="dates" selectionMode="range" :manualInput="false" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="dates" selectionMode="range" :manualInput="false" /> <Calendar v-model="dates" selectionMode="range" :manualInput="false" />
</div> </div>

View File

@ -27,10 +27,12 @@ export default {
datetime24h: null, datetime24h: null,
time: null, time: null,
code: { code: {
basic: `<Calendar id="calendar-12h" v-model="datetime12h" showTime hourFormat="12" /> basic: `
<Calendar id="calendar-12h" v-model="datetime12h" showTime hourFormat="12" />
<Calendar id="calendar-24h" v-model="datetime24h" showTime hourFormat="24" /> <Calendar id="calendar-24h" v-model="datetime24h" showTime hourFormat="24" />
<Calendar id="calendar-timeonly" v-model="time" timeOnly />`, <Calendar id="calendar-timeonly" v-model="time" timeOnly />`,
options: `<template> options: `
<template>
<div class="card flex flex-wrap gap-3 p-fluid"> <div class="card flex flex-wrap gap-3 p-fluid">
<div class="flex-auto"> <div class="flex-auto">
<label for="calendar-12h" class="font-bold block mb-2"> 12h Format </label> <label for="calendar-12h" class="font-bold block mb-2"> 12h Format </label>
@ -58,7 +60,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex flex-wrap gap-3 p-fluid"> <div class="card flex flex-wrap gap-3 p-fluid">
<div class="flex-auto"> <div class="flex-auto">
<label for="calendar-12h" class="font-bold block mb-2"> 12h Format </label> <label for="calendar-12h" class="font-bold block mb-2"> 12h Format </label>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" touchUI />`, basic: `
options: `<template> <Calendar v-model="date" touchUI />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" touchUI /> <Calendar v-model="date" touchUI />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" touchUI /> <Calendar v-model="date" touchUI />
</div> </div>

View File

@ -14,8 +14,10 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar v-model="date" view="year" dateFormat="yy" />`, basic: `
options: `<template> <Calendar v-model="date" view="year" dateFormat="yy" />`,
options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" view="year" dateFormat="yy" /> <Calendar v-model="date" view="year" dateFormat="yy" />
</div> </div>
@ -30,7 +32,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar v-model="date" view="year" dateFormat="yy" /> <Calendar v-model="date" view="year" dateFormat="yy" />
</div> </div>

View File

@ -43,7 +43,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<template> basic: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<form @submit="onSubmit" class="flex flex-column gap-2"> <form @submit="onSubmit" class="flex flex-column gap-2">
<label for="date">Date</label> <label for="date">Date</label>
@ -54,7 +55,8 @@ export default {
<Toast /> <Toast />
</div> </div>
</template>`, </template>`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<form @submit="onSubmit" class="flex flex-column gap-2"> <form @submit="onSubmit" class="flex flex-column gap-2">
<label for="date">Date</label> <label for="date">Date</label>
@ -95,7 +97,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<form @submit="onSubmit" class="flex flex-column gap-2"> <form @submit="onSubmit" class="flex flex-column gap-2">
<label for="date">Date</label> <label for="date">Date</label>

View File

@ -21,7 +21,8 @@ export default {
return { return {
date: null, date: null,
code: { code: {
basic: `<Calendar basic: `
<Calendar
v-model="date" v-model="date"
showIcon showIcon
:pt="{ :pt="{
@ -31,7 +32,8 @@ export default {
} }
}" }"
/>`, />`,
options: `<template> options: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar <Calendar
v-model="date" v-model="date"
@ -55,7 +57,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Calendar <Calendar
v-model="date" v-model="date"

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export const TRANSITIONS = {
export const TRANSITIONS = {
overlay: { overlay: {
enterFromClass: 'opacity-0 scale-75', enterFromClass: 'opacity-0 scale-75',
enterActiveClass: 'transition-transform transition-opacity duration-150 ease-in', enterActiveClass: 'transition-transform transition-opacity duration-150 ease-in',
@ -151,7 +150,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<Calendar v-model="date" /> <Calendar v-model="date" />
</div> </div>

View File

@ -18,7 +18,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Card role="region"> basic: `
<Card role="region">
Content Content
</Card>` </Card>`
} }

View File

@ -29,7 +29,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Card style="width: 25em"> basic: `
<Card style="width: 25em">
<template #header> <template #header>
<img alt="user header" src="/images/usercard.png" /> <img alt="user header" src="/images/usercard.png" />
</template> </template>
@ -46,7 +47,8 @@ export default {
<Button icon="pi pi-times" label="Cancel" severity="secondary" style="margin-left: 0.5em" /> <Button icon="pi pi-times" label="Cancel" severity="secondary" style="margin-left: 0.5em" />
</template> </template>
</Card>`, </Card>`,
options: `<template> options: `
<template>
<div class="card flex align-items-center justify-content-center"> <div class="card flex align-items-center justify-content-center">
<Card style="width: 25em"> <Card style="width: 25em">
<template #header> <template #header>
@ -70,7 +72,8 @@ export default {
<script> <script>
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card flex align-items-center justify-content-center"> <div class="card flex align-items-center justify-content-center">
<Card style="width: 25em"> <Card style="width: 25em">
<template #header> <template #header>

View File

@ -8,7 +8,9 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `import Card from 'primevue/card';` basic: `
import Card from 'primevue/card';
`
} }
}; };
} }

View File

@ -19,7 +19,8 @@ export default {
data() { data() {
return { return {
code: { code: {
basic: `<Card :pt="{ body: { class: 'bg-primary border-round-lg' } }"> basic: `
<Card :pt="{ body: { class: 'bg-primary border-round-lg' } }">
<template #title> Simple Card </template> <template #title> Simple Card </template>
<template #content> <template #content>
<p> <p>
@ -28,7 +29,8 @@ export default {
</p> </p>
</template> </template>
</Card>`, </Card>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Card :pt="{ body: { class: 'bg-primary border-round-lg' } }"> <Card :pt="{ body: { class: 'bg-primary border-round-lg' } }">
<template #title> Simple Card </template> <template #title> Simple Card </template>
@ -41,7 +43,8 @@ export default {
</Card> </Card>
</div> </div>
</template>`, </template>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Card :pt="{ body: { class: 'bg-primary border-round-lg' } }"> <Card :pt="{ body: { class: 'bg-primary border-round-lg' } }">
<template #title> Simple Card </template> <template #title> Simple Card </template>

View File

@ -4,7 +4,7 @@
PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the PrimeVue offers a built-in Tailwind theme to get you started quickly. The default values related to the component are displayed below. The component can easily be styled with your own design based on Tailwind utilities, see the
<PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example. <PrimeVueNuxtLink to="/tailwind">Tailwind Customization</PrimeVueNuxtLink> section for an example.
</p> </p>
<DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz /> <DocSectionCode :code="code1" hideToggleCode importCode hideCodeSandbox hideStackBlitz scrollable />
<p class="mt-4">A playground sample with the pre-built Tailwind theme.</p> <p class="mt-4">A playground sample with the pre-built Tailwind theme.</p>
<DocSectionCode :code="code2" embedded /> <DocSectionCode :code="code2" embedded />
</DocSectionText> </DocSectionText>
@ -15,8 +15,7 @@ export default {
data() { data() {
return { return {
code1: { code1: {
basic: ` basic: `export default {
export default {
card: { card: {
root: { root: {
class: [ class: [
@ -39,7 +38,8 @@ export default {
` `
}, },
code2: { code2: {
composition: `<template> composition: `
<template>
<div class="card flex items-center justify-center"> <div class="card flex items-center justify-center">
<Card style="width: 25em"> <Card style="width: 25em">
<template #header> <template #header>

View File

@ -51,7 +51,8 @@ export default {
} }
], ],
code: { code: {
basic: `<Carousel :value="products" :numVisible="3" :numScroll="3" :responsiveOptions="responsiveOptions"> basic: `
<Carousel :value="products" :numVisible="3" :numScroll="3" :responsiveOptions="responsiveOptions">
<template #item="slotProps"> <template #item="slotProps">
<div class="border-1 surface-border border-round m-2 text-center py-5 px-3"> <div class="border-1 surface-border border-round m-2 text-center py-5 px-3">
<div class="mb-3"> <div class="mb-3">
@ -69,7 +70,8 @@ export default {
</div> </div>
</template> </template>
</Carousel>`, </Carousel>`,
options: `<template> options: `
<template>
<div class="card"> <div class="card">
<Carousel :value="products" :numVisible="3" :numScroll="3" :responsiveOptions="responsiveOptions"> <Carousel :value="products" :numVisible="3" :numScroll="3" :responsiveOptions="responsiveOptions">
<template #item="slotProps"> <template #item="slotProps">
@ -140,7 +142,8 @@ export default {
} }
}; };
<\/script>`, <\/script>`,
composition: `<template> composition: `
<template>
<div class="card"> <div class="card">
<Carousel :value="products" :numVisible="3" :numScroll="3" :responsiveOptions="responsiveOptions"> <Carousel :value="products" :numVisible="3" :numScroll="3" :responsiveOptions="responsiveOptions">
<template #item="slotProps"> <template #item="slotProps">

Some files were not shown because too many files have changed in this diff Show More