Skip to content

Card

Card widget is a universal wrapper for displaying content in the form of cards with support for two modes: tab (tabs) and plain (plain).

Demo

Tab View Demo

Alex Johnson2h

This looks great! I really like the new design direction we're taking.

Sarah Chen1h

I agree! The color scheme works really well.

Mike Wilson45m

Should we consider accessibility implications?

Emma Davis4h

Could we explore some alternative layouts? I have a few ideas that might work better for mobile users.

David Kim6h

The performance improvements are impressive. Load times have decreased by 40%!

Lisa Park5h

That's amazing! What optimizations did you implement?

Plain View Demo

Description

Name
Іван Петренко
Email
Role
Administrator
Department
IT Department
Phone
+380 44 123 4567

History

Sarah Chen14:30
createdproject-001
Lisa Park09:30
updatedblog-post-002
Admin System04:45
updatednew-user-003
Project Manager23:30
updatedproject-task-004
Alex Johnson2h

This looks great! I really like the new design direction we're taking.

Sarah Chen1h

I agree! The color scheme works really well.

Mike Wilson45m

Should we consider accessibility implications?

Emma Davis4h

Could we explore some alternative layouts? I have a few ideas that might work better for mobile users.

David Kim6h

The performance improvements are impressive. Load times have decreased by 40%!

Lisa Park5h

That's amazing! What optimizations did you implement?

File List

Project_Proposal.pdf
pdf
Design_System.sketch
sketch
Meeting_Recording.mp4
mp4
Brand_Guidelines.docx
docx
Assets.zip
zip
Logo_Final.png
png

Usage

Basic usage

vue
// Plain view
<Card :panels="panelsData" view="plain">
  <template #panel-0>
    <Widget />
  </template>
</Card>

// Tab view
<Card :data="tabsData" view="tab">
  <template #tab-0>
    <Widget />
  </template>
</Card>

TypeScript interfaces

ts
interface ICard {
  panels?: ICardItem[];
  data?: any;
  view?: 'tab' | 'plain';
}

interface ICardItem {
  name?: string;
  label?: string;
  component?: string;
  slot?: string;
  col?: number;
  html?: string;
  title?: string;
  type?: string;
  count?: number;
}

Data structure

Card widget can work with two types of data:

  1. Direct array of panels through the panels property
  2. Complex structure through the data property with support for type: "tabs"
ts
// Example of data structure
[
  {
    "type": "tabs",
    "col": 12,
    "items": [
      {
        "name": "general_info",
        "html": "HTML content",
        "title": "General information"
      },
      {
        "component": "vs-widget-gallery",
        "title": "Gallery"
      }
    ]
  }
]

Properties

Card

PropertyTypeDefaultDescription
panelsICardItem[][]Array of panels to display
dataany{}Data for processing (supports structure with type: "tabs")
view'tab' | 'plain''plain'Display mode

CardItem

PropertyTypeDefaultDescription
namestring-Unique name of the element
labelstring-Label of the element
titlestring-Title of the element
componentstring-Name of the component for rendering
slotstring-Name of the slot
colnumber12Number of columns (1-12)
htmlstring-HTML content for display

Key features

  • Tab View: Displays content in tabs with the ability to switch
  • Plain View: Displays content in a grid of panels
  • HTML support: You can pass HTML content through the html property
  • Components: Support for dynamic rendering of components
  • Slots: Flexible system of slots for custom content
  • Adaptability: Support for different column sizes (1-12)
  • TypeScript: Full support for TypeScript with type checking