Socket
Socket
Sign inDemoInstall

@bearei/react-card

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bearei/react-card

Base card components that support React and React native


Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

react-card

Base card components that support React and React native

Installation

yarn add @bearei/react-card --save

Parameters

NameTypeRequiredDescription
titleReactNodeCard title
headerReactNodeCard header
footerReactNodeCard footer
sizesmall medium largeCard size
shapesquare circle roundCard shape
loadingbooleanWhether the card is loading
disabledbooleanWhether or not to disable the card
paddingbooleanWhether the Card content is set to padding
borderbooleanWhether the card is set to border
contentReactNodeCard content
onClick(e: React.MouseEvent) => voidThis function is called when card is clicked
onTouchEnd(e: React.TouchEvent) => voidThis function is called when the card is pressed
onPress(e: GestureResponderEvent) => voidThis function is called when the card is pressed -- react native
renderHeader(props: CardHeaderProps) => ReactNodeRender the card header
renderMain(props: CardMainProps) => ReactNodeRender the card main
renderFooter(props: CardFooterProps) => ReactNodeRender the card footer
renderContainer(props: CardContainerProps) => ReactNodeRender the card container

Use

import React from 'React';
import ReactDOM from 'react-dom';
import Card from '@bearei/react-card';

const card = (
  <Card
    title="card"
    renderHeader={({ title }) => <div>{title}</div>}
    renderMain={({ title }) => <div>{title}</div>}
    renderFooter={({ title }) => <div>{title}</div>}
    renderContainer={({ id, children }) => (
      <div data-id={id} tabIndex={1}>
        {children}
      </div>
    )}
  />
);

ReactDOM.render(card, container);

Keywords

FAQs

Package last updated on 03 Feb 2023

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