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

@automattic/calypso-ui

Package Overview
Dependencies
Maintainers
22
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automattic/calypso-ui

Calypso UI Components

  • 2.0.0-alpha.0
  • next
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
22
Weekly downloads
 
Created
Source

Card

Cards are used as containers to group similar information and tasks together to make it easier to scan and read.

Includes both Card and CompactCard

Usage

import Card from 'components/card';
import CompactCard from 'components/card/compact';

render: function() {
  return (
    <div className="your-stuff">
      <Card>
        <span>Your stuff in a Card</span>
      </Card>

      <CompactCard>
        <span>Your stuff in a CompactCard</span>
      </CompactCard>
    </div>
  );
}

Props

NameTypeDefaultDescription
classNamestringnullAdds CSS classes.
hrefstringnullURL of the card. Adds a right chevron icon.
tagNamestringnullAllows you to control the tag name of the card wrapper (only if href is not specified).
displayAsLinkboolfalseUsed for cards without a href that need to display as a link. Primarily intended for use when tagName is "button" and when an onClick attribute is set. The corresponding button will render with the same visual appearance as a link (including the right chevron icon).
targetstringnullIf used with href, this specifies where the link opens. Changes the icon to external.
compactboolfalseDecreases the size of the card.
highlightstringnullDisplays a colored highlight. If specified (default is no highlight), can be one of info, success, error, or warning.

Additional usage information

  • Compact: Use to save vertical space when displaying many consecutive cards in a list. The CompactCard component slightly modifies the Card component (and is equivalent to using <Card compact />).
  • Highlight: Use when you need to highlight information that is neither a Notice or Banner.

General guidelines

  • Avoid using cards within cards. This is an inefficient use of space.
  • Don't display more than one primary button or action in a single card.
  • To expand/collapse a card, use the FoldableCard component.
  • To add a text heading to a card, use the CardHeading component.
  • To add a call to action, use the ActionCard component.

FAQs

Package last updated on 15 Sep 2019

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