JSPM

@workday/canvas-kit-react-card

4.4.3-next.3+37cfd156
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 694
  • Score
    100M100P100Q112442F
  • License Apache-2.0

Common Canvas card component for React

Package Exports

  • @workday/canvas-kit-react-card

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@workday/canvas-kit-react-card) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Canvas Kit Card

Generic Canvas card component

> Workday Design Reference

Installation

yarn add @workday/canvas-kit-react

or

yarn add @workday/canvas-kit-react-card

Usage

import Card from '@workday/canvas-kit-react-card';
import {depth, spacing} from '@workday/canvas-kit-react-core';

<Card heading="Title">
  Card contents
</Card>

<Card padding={spacing.l}>
  Card with custom padding
</Card>

<Card depth={depth[1]}>
  Card with custom depth
</Card>

Static Properties

None

Component Props

Required

None

Optional

heading: ReactNode

Heading at the top of the card.

Default: null


headingId: string

Heading ID for accessibility. Useful tie to an aria-labelledby


padding: 0 | CanvasSpacingValue

Padding of the card. Style imported from @workday/canvas-kit-react-core.

Default: spacing.l


depth: CanvasDepthValue

Depth of the card. Style imported from @workday/canvas-kit-react-core.

Default: depth[2]


width: number | string

Width of the card.

Default: null


height: number | string

Height of the card.

Default: null