npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@synerise/ds-card

v0.19.13

Published

Card UI Component for the Synerise Design System

Downloads

888

Readme


id: card title: Card

Cards contain content and actions related to a single subject.

When to use it


To display any kind of content (for example, tables, charts, dashboards, and more).

Component anatomy


This component is complex, which means it consists of other components:

Installation


npm i @synerise/ds-card

or

yarn add @synerise/ds-card

Usage


<Card
        lively
        withHeader
        title="Card Example"
        description="Some description"
        icon={<IconComponent />}
        iconColor="#54cb0b"
        size="medium"
      >
       Content
      </Card>

Card single


Card group


API


Properties

| Property | Description | Type | Default | | --------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- | | background | Background of Card container | white / white-shadow / grey / grey-shadow / outline | white | | children | Defines if the button casts a shadow when the cursor is hovered over | React.ReactNode | - | | renderBadge | Custom slot content for badge icon | React.ReactNode? | - | | className | Defines the class name of the container | string | - | | compactHeader | Set as true, displays the description next to the header. Set as false, displays the description below the header | boolean | - | | description | Defines the content of the card description (in the header) | React.ReactNode | string | | disabled | Defines if the state of the component is disabled | boolean | - | | headerBorderBottom | Show line under CardHeader | boolean | false | | headerSideChildren | Defines if the container includes a button (in the header) | React.ReactNode | - | | staticContent | Defines content that's visible even if hideContent is true | React.ReactNode | - | | hideContent | Defines the initial visibility of the content | boolean | false | | icon | Icon of CardBadge, if defined then avatar prop gets ignored | React.ReactNode | - | | iconColor | Defines the color of the icon | string | - | | avatar | Avatar for CardBadge | React.ReactNode | - | | lively | Defines if the container casts a shadow when the cursor is hovered over | boolean | - | | raised | Defines if the container casts a shadow on the background | boolean | - | | style | Defines the CSS of the container | React.CSSProperties | - | | size | Defines the width of the container (the container width is set to 100% when this property is not passed). | small (472px) / medium (588px) / large (966px) / extraLarge (1232px) | - | | title | Defines the title of the card (in the header) | string | - | | titleTag | an optional status tag next to title | ReactElement | - | | withHeader | Defines if the header is shown | boolean | - | | withoutPadding | Reset padding of ContentContainer | boolean | false | | showSideChildrenWhenHeaderHidden | Show headerSideChildren on the bottom when header is scrolled out of view | boolean | false | | defaultHeaderBackgroundColor | Defines if header should have default white color | boolean | false |

CardBadge

| Property | Description | Type | Default | | -------- | ----------------------------------- | ------------------------------------------- | --------- | | Icon | Icon rendered in badge | React.ReactNode | - | | Status | Defines the color of badge and icon | success / error / warning / default | default |

CardSummary

Renders a summary in a bulletted list form. Can be assigned to Card.staticContent prop

| Property | Description | Type | Default | | -------- | ------------------------------------------- | ------------------------ | ------- | | title | Otional title rendered above bulletted list | React.ReactNode | - | | items | Defines the color of badge and icon | CardSummaryItemProps[] | - |

CardSummaryItemProps

| Property | Description | Type | Default | | ----------------- | ------------------------------------------------------------------------------ | ---------------------- | ------- | | key | Unique key | React.Key | - | | label | Optional label to display | React.ReactNode | - | | value | Mandatory value to display | React.ReactNode | - | | summaryRowObjects | Optional array of react elements, renders 4 in a row in a toggleable container | React.ReactElement[] | - |