MigsLab UIVue 3 component workshop

Components

Card

A container with optional header, body and footer sections.

import { CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent } from '@/MigsLab/shared'

Example

User info

Profile summary

Name: Stella Marie

Role: Developer

A flat card has no border and no shadow.

<CardComponent>
  <CardHeaderComponent>User info</CardHeaderComponent>
  <CardBodyComponent>Name: Stella Marie</CardBodyComponent>
  <CardFooterComponent>
    <ButtonComponent rounded>Edit</ButtonComponent>
  </CardFooterComponent>
</CardComponent>

<CardComponent flat>...</CardComponent>

API

CardComponent props

NameType Default Description
borderbooleantrueShow the outer border.
shadowbooleantrueShow a subtle shadow.
flatbooleanfalseRemove both border and shadow.

Slots

NameDescription
CardComponent: defaultCard sections.
CardHeaderComponent: defaultTitle area.
CardBodyComponent: defaultMain content.
CardFooterComponent: defaultActions, right aligned.