How to Improve Performance in Vue
A comprehensive guide to optimizing performance in your Vue.js applications.
The VCardArticle
component is a versatile card designed for displaying article information, including a publish date, title, description, and an optional cover image. It supports customizable styles and layouts. Location: ui-kit/src/components/VCard/VCardArticle.vue
Prop Name | Type | Required | Default | Description |
---|---|---|---|---|
data | IFrontmatter | Yes | — | The article's metadata, including title, description, publish date, and cover image. |
small | Boolean | No | false | Enables a compact layout for the card. |
Slot Name | Description |
---|---|
Default | Content inside the card's main body. |
<script setup lang="ts">
import VCardArticle from 'UiKit/components/VCard/VCardArticle';
</script>
<template>
<VCardArticle
:data="{
title: 'How to Improve Performance in Vue',
description: 'A comprehensive guide to optimizing performance in your Vue.js applications.',
publishDate: '2025-01-10T00:00:00Z',
url: '/articles/vue-performance',
cover: { image: '/images/blog/players.jpeg' },
}"
/>
</template>
A comprehensive guide to optimizing performance in your Vue.js applications.
The VSectionCardArticleList
component is a structured section that displays a list of articles in a styled layout. It integrates with the VCardArticle
component for individual article cards. Location: ui-kit/src/components/VCard/VSectionCardArticleList.vue
Prop Name | Type | Required | Default | Description |
---|---|---|---|---|
title | String | No | — | The main title of the section. |
subTitle | String | No | — | The subtitle of the section. |
items | IFrontmatter[] | Yes | — | An array of article metadata objects. Each object is passed to VCardArticle . |
buttonHref | String | No | — | URL for an optional button in the section header. |
buttonText | String | No | — | Text for the optional button in the section header. |
noContainer | Boolean | No | false | Determines if the section has a container wrapper. |
Slot Name | Description |
---|---|
infoShort | Content displayed in the section header's short info area. |
noData | Custom content to display when the items array is empty. |
<script setup lang="ts">
import VSectionCardArticleList from 'UiKit/components/VCard/VSectionCardArticleList.vue';
const articles = [
{
title: 'Article One',
description: 'This is the description for article one.',
publishDate: '2024-01-10',
url: '#',
slug: 'article-one',
cover: { image: '/images/blog/players.jpeg' },
},
{
title: 'Article Two',
description: 'This is the description for article two.',
publishDate: '2024-01-12',
url: '#',
slug: 'article-two',
cover: { image: '/images/blog/players.jpeg' },
},
// More articles can be added here
];
</script>
<template>
<VSectionCardArticleList
title="Latest Articles"
subTitle="Stay informed with our updates"
:items="articles"
buttonHref="/articles"
buttonText="View All"
>
<template #infoShort>
<p>Read the most recent updates and articles from our team.</p>
</template>
<template #noData>
<p>No articles available at the moment. Please check back later.</p>
</template>
</VSectionCardArticleList>
</template>
Stay informed with our updates
No articles available at the moment. Please check back later.
The VCardArticleMain
component is a card component designed to display article information such as the article title, description, and publication date, with a background image for visual appeal. It allows flexibility in layout depending on the screen size (tablet vs desktop). Location: ui-kit/src/components/VCard/VCardArticleMain.vue
Name | Type | Default | Description |
---|---|---|---|
data | IFrontmatter | N/A | The article data object. Contains properties such as title , description , publishDate , and url . |
secondary | Boolean | false | If true , the card applies a secondary style (changes the layout and background). |
<script setup lang="ts">
import VCardArticleMain from 'UiKit/components/VCard/VCardArticleMain.vue';
// Sample article data
const articleData = {
title: 'How to Build Scalable Vue Applications',
description: 'This article walks you through best practices for building scalable applications with Vue.',
publishDate: '2024-01-01',
url: '/articles/build-vue-applications',
cover: {
image: '/images/article-cover.jpg'
}
};
</script>
<template>
<VCardArticleMain
:data="articleData"
:secondary="false"
/>
</template>
This article walks you through best practices for building scalable applications with Vue.
This article walks you through best practices for building scalable applications with Vue.