Article

VCardArticle Component

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

Props

Prop NameTypeRequiredDefaultDescription
dataIFrontmatterYes-The article's metadata, including title, description, publish date, and cover image.
smallBooleanNofalseEnables a compact layout for the card.

Slots

Slot NameDescription
DefaultContent inside the card's main body.

Example

vue
<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>

How to Improve Performance in Vue

VSectionCardArticleList Component

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

Props

Prop NameTypeRequiredDefaultDescription
titleStringNo-The main title of the section.
subTitleStringNo-The subtitle of the section.
itemsIFrontmatter[]Yes-An array of article metadata objects. Each object is passed to VCardArticle.
buttonHrefStringNo-URL for an optional button in the section header.
buttonTextStringNo-Text for the optional button in the section header.
noContainerBooleanNofalseDetermines if the section has a container wrapper.

Slots

Slot NameDescription
infoShortContent displayed in the section header's short info area.
noDataCustom content to display when the items array is empty.

Example

vue
<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>
No data:

Latest Articles

No articles available at the moment. Please check back later.

Section with list:

Latest Articles

  • Article One

  • Article Two

View All

VCardArticleMain Component

Description

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

Props

NameTypeDefaultDescription
dataIFrontmatterN/AThe article data object. Contains properties such as title, description, publishDate, and url.
secondaryBooleanfalseIf true, the card applies a secondary style (changes the layout and background).

Example Usage

vue
<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>
How to Build Scalable Vue Applications

This article walks you through best practices for building scalable applications with Vue.

Secondary:
How to Build Scalable Vue Applications

This article walks you through best practices for building scalable applications with Vue.

Help Ukraine to stop russian aggression