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-login-card>

Examples

Basic
Vue React Angular TypeScript
<template>
  <div>
    <c-login-card>
      <c-login-card-title>Sign in to My CSC</c-login-card-title>

      <c-login-card-content>
        <p>Access your projects and services with your CSC account.</p>

        <c-text-field label="Username" name="username" />

        <c-text-field label="Password" name="password" type="password" />
      </c-login-card-content>

      <c-login-card-actions justify="space-between">
        <c-button size="large">Sign in</c-button>

        <c-link href="https://csc.fi" underline>Forgot password?</c-link>
      </c-login-card-actions>
    </c-login-card>
  </div>
</template>
Basic · c-login-card-title
Vue React Angular TypeScript
<template>
  <div>
    <c-login-card>
      <c-login-card-title>Sign in to My CSC</c-login-card-title>

      <c-login-card-content>
        <p>Access your projects and services with your CSC account.</p>
      </c-login-card-content>

      <c-login-card-actions>
        <c-button>Sign in</c-button>
      </c-login-card-actions>
    </c-login-card>
  </div>
</template>
Basic · c-login-card-content
Vue React Angular TypeScript
<template>
  <div>
    <c-login-card>
      <c-login-card-title>Sign in to My CSC</c-login-card-title>

      <c-login-card-content>
        <p>Access your projects and services with your CSC account.</p>

        <c-text-field label="Username" name="username" />

        <c-text-field label="Password" name="password" type="password" />
      </c-login-card-content>

      <c-login-card-actions>
        <c-button>Sign in</c-button>
      </c-login-card-actions>
    </c-login-card>
  </div>
</template>
Basic · c-login-card-actions
Vue React Angular TypeScript
<template>
  <div>
    <c-login-card>
      <c-login-card-title>Sign in to My CSC</c-login-card-title>

      <c-login-card-content>
        <p>Access your projects and services with your CSC account.</p>
      </c-login-card-content>

      <c-login-card-actions justify="space-between">
        <c-button size="large">Sign in</c-button>

        <c-link href="https://csc.fi" underline>Forgot password?</c-link>
      </c-login-card-actions>
    </c-login-card>
  </div>
</template>

API reference

<c-login-card>

Properties

PropertyAttributeTypeDefaultDescription
backgroundPositionbackground-positionstring'bottom right'Background position (css background-position)
mobileBreakpointmobile-breakpointnumber600Mobile breakpoint in pixels
overlayoverlaybooleanfalseAdd colored overlay to the background image
overlayBlendModeoverlay-blend-modeCLoginCardBlendMode'multiply'Add colored overlay to the background image
srcsrcstring''Background image

Slots

SlotDescription
defaultLogin Card contents

CSS parts

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

PartDescription
rootThe outer article carrying the card background and radius
cardThe shadowed, positioned container inside the root
imageThe clipped background-image layer of the card
contentThe padded column wrapping the slotted contents

Types

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

CLoginCardBlendMode

CSS `mix-blend-mode` applied to the primary-coloured overlay drawn over the background image when `overlay` is set.

export type CLoginCardBlendMode =
  | 'color-burn'
  | 'color-dodge'
  | 'color'
  | 'darken'
  | 'difference'
  | 'exclusion'
  | 'hard-light'
  | 'hue'
  | 'lighten'
  | 'luminosity'
  | 'multiply'
  | 'normal'
  | 'overlay'
  | 'saturation'
  | 'screen'
  | 'soft-light';
CLoginCardProps
export interface CLoginCardProps {
  /**
   * Background position (css background-position)
   *
   * @seeded from csc-ui — verify
   * @freeform any CSS background-position value
   */
  backgroundPosition?: string;
  /**
   * Mobile breakpoint in pixels
   *
   * @seeded from csc-ui — verify
   */
  mobileBreakpoint?: number;
  /**
   * Add colored overlay to the background image
   *
   * @seeded from csc-ui — verify
   */
  overlay?: boolean;
  /**
   * Add colored overlay to the background image
   *
   * @seeded from csc-ui — verify
   */
  overlayBlendMode?: CLoginCardBlendMode;
  /**
   * Background image
   *
   * @seeded from csc-ui — verify
   * @freeform any image URL
   */
  src?: string;
}

<c-login-card-title>

Slots

SlotDescription
defaultLogin card title text

CSS parts

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

PartDescription
rootThe inner header element carrying the heading typography

<c-login-card-content>

Slots

SlotDescription
defaultLogin card content

CSS parts

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

PartDescription
rootThe inner article stacking the slotted content vertically

<c-login-card-actions>

Properties

PropertyAttributeTypeDefaultDescription
alignalignCLoginCardActionsAlign'center'Align the actions
justifyjustifyCLoginCardActionsJustify'start'Justify the actions

Slots

SlotDescription
defaultLogin card actions

CSS parts

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

PartDescription
rootThe outer footer element
actionsThe flex menu row laying out the slotted actions

Types

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

CLoginCardActionsAlign

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

export type CLoginCardActionsAlign = 'center' | 'end' | 'start';
CLoginCardActionsJustify

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

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