Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools-uikit/card

Package Overview
Dependencies
Maintainers
3
Versions
819
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/card

Cards are used to display content and actions on a single topic.

  • 19.19.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Card

Description

Cards are used to display content and actions on a single topic.

Installation

yarn add @commercetools-uikit/card
npm --save install @commercetools-uikit/card

Additionally install the peer dependencies (if not present)

yarn add react react-router-dom
npm --save install react react-router-dom

Usage

import Card from '@commercetools-uikit/card';

const Example = () => (
  <Card theme="light" type="raised">
    <p>{`You'll never guess where I've been!`}</p>
  </Card>
);

export default Example;

Properties

PropsTypeRequiredDefaultDescription
typeunion
Possible values:
'raised' , 'flat'
'raised'Determines the visual effect of the card. A raised card has a box shadow while a flat card has just a border.
insetScaleunion
Possible values:
'none' , 's' , 'm' , 'l' , 'xl'
'm'Determines the spacing (padding) that the content should have from the card borders. In case there is no space needed, you can pass none.
themeunion
Possible values:
'light' , 'dark'
'light'Determines the background color of the card.
classNamestringPass a custom CSS class, useful to override the styles.
NOTE: This is not recommended and should only be used for building new components that require special style adjustments.
childrenReactNode
onClickFunction
See signature.
The callback function to be executed when the Card component is clicked. Prefer this for managing side effects rather than navigation.
tounion
Possible values:
string , LocationDescriptor
The URL that the Card should point to. If provided, the Card will be rendered as an anchor element.
isExternalLinkbooleanA flag to indicate if the Card points to an external source.
isDisabledbooleanIndicates that a clickable Card should not allow clicks. This allows consumers to temporarily disable a clickable Card.

Signatures

Signature onClick

() => void

Keywords

FAQs

Package last updated on 10 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc