Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@leafygreen-ui/card

Package Overview
Dependencies
Maintainers
6
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/card

leafyGreen UI Kit Card

latest
Source
npmnpm
Version
13.3.1
Version published
Maintainers
6
Created
Source

Card

npm (scoped)

View on MongoDB.design

Installation

PNPM

pnpm add @leafygreen-ui/card

Yarn

yarn add @leafygreen-ui/card

NPM

npm install @leafygreen-ui/card

Example

import Card from '@leafygreen-ui/card';

<Card className="card-styles" as="article">
  This is my card component
</Card>;

Properties

Card is a styled wrapper for the Box component. Any properties you would pass to Box can also be passed to Card.

PropTypeDescriptionDefault
childrenReact.ReactNodeContent rendered inside of the <Card /> component
classNamestringAdds a className to the class attribute
darkModebooleanDetermines whether or not the component will appear in dark mode.false

Any other properties will be spread on the Box element.

Usage and Interactivity

This component is designed to be a container for other elements and content. We discourage onClick or href directly to the Card component. Instead, we recommend adding interactive elements inside the component.

DO ✅

<Card>
  <Button onClick={handleOnClick} />
</Card>

DON'T 🚫

<Card onClick={handleOnClick}>This is my card component</Card>

FAQs

Package last updated on 21 Jan 2026

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