CSC Design System next
VueFlavour Vue React Angular TypeScript PrimaryCSC UI ColorsPrimarySecondaryAccentCustom ColorsRedOrangeGreenBluePurplePink
Guides Getting started Customization Data visualization Migration guide Componentsc-accordionc-alertc-autocompletec-badgec-buttonc-button-groupc-cardc-checkboxc-csc-logoc-data-tablec-dividerc-iconc-icon-buttonc-inputc-linkc-listc-loaderc-login-buttonsc-login-cardc-mainc-menuc-messagec-modalc-navigation-buttonc-otp-inputc-pagec-paginationc-popoverc-progress-barc-progress-circlec-radio-groupc-selectc-side-navigationc-sliderc-spinnerc-statusc-stepsc-switchc-tablec-tabsc-tagsc-text-fieldc-toastsc-toolbarc-tooltip

<c-card>

Examples

Basic
Vue React Angular TypeScript
<template>
  <div>
    <c-card>
      <c-card-title>Project members</c-card-title>

      <c-card-content>
        <p>Manage who has access to this project and what they can do.</p>
      </c-card-content>

      <c-card-actions justify="end">
        <c-button text>Cancel</c-button>

        <c-button>Save</c-button>
      </c-card-actions>
    </c-card>
  </div>
</template>
Basic · c-card-title
Vue React Angular TypeScript
<template>
  <div>
    <c-card>
      <c-card-title>
        Notifications
        <c-button slot="actions" ghost size="small">Mark all read</c-button>
      </c-card-title>

      <c-card-content>
        <p>You have 3 unread notifications.</p>
      </c-card-content>
    </c-card>
  </div>
</template>

API reference

<c-card>

Properties

PropertyAttributeTypeDefaultDescription
fullscreenfullscreenbooleanfalseEnable the fullscreen toggle button

Methods

MethodSignatureDescription
enterFullscreen()Enter fullscreen from the outside
exitFullscreen()Exit fullscreen from the outside

Slots

SlotDescription
defaultCard components

CSS parts

Style from outside with c-card::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe card's visible surface, carries the background, border, radius, shadow and section spacing
fullscreen-toggleThe circular fullscreen toggle button shown when the fullscreen prop is set

<c-card-title>

Slots

SlotDescription
defaultCard title text
actionsAction controls shown to the right of the title

CSS parts

Style from outside with c-card-title::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe outer header element carrying the title typography and padding
headerThe wrapper around the heading and its underline
headingThe paragraph holding the slotted title text
underlineThe decorative accent bar under the heading
actionsThe wrapper around the slotted action controls

<c-card-content>

Slots

SlotDescription
defaultCard contents

CSS parts

Style from outside with c-card-content::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe padded wrapper stacking the slotted content vertically

<c-card-actions>

Properties

PropertyAttributeTypeDefaultDescription
alignalignCCardActionsAlign'center'Align the actions
justifyjustifyCCardActionsJustify'start'Justify the actions

Slots

SlotDescription
defaultCard actions

CSS parts

Style from outside with c-card-actions::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe padded footer wrapping the actions row
actionsThe flex row laying out the slotted action elements

Types

Importable from the package root: import type { … } from '@cscfi/csc-ui'

CCardActionsAlign

Cross-axis alignment of the slotted actions within the row.

export type CCardActionsAlign = 'center' | 'end' | 'start';
CCardActionsJustify

Main-axis distribution of the slotted actions. `stretch` makes every action grow to fill the row.

export type CCardActionsJustify =
  | 'center'
  | 'end'
  | 'space-around'
  | 'space-between'
  | 'start'
  | 'stretch';
CCardActionsProps
export interface CCardActionsProps {
  /**
   * Align the actions
   *
   * @seeded from csc-ui — verify
   */
  align?: CCardActionsAlign;
  /**
   * Justify the actions
   *
   * @seeded from csc-ui — verify
   */
  justify?: CCardActionsJustify;
}