{"id":17475446,"url":"https://github.com/ummahusla/react-simple-card","last_synced_at":"2025-04-10T18:04:58.360Z","repository":{"id":25157360,"uuid":"103300896","full_name":"ummahusla/react-simple-card","owner":"ummahusla","description":"React simple card component","archived":false,"fork":false,"pushed_at":"2023-01-01T12:36:06.000Z","size":3869,"stargazers_count":22,"open_issues_count":19,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T14:10:11.228Z","etag":null,"topics":["card","react"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-simple-card","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ummahusla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-12T17:24:57.000Z","updated_at":"2025-01-23T08:27:39.000Z","dependencies_parsed_at":"2023-01-14T07:00:22.301Z","dependency_job_id":null,"html_url":"https://github.com/ummahusla/react-simple-card","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ummahusla%2Freact-simple-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ummahusla%2Freact-simple-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ummahusla%2Freact-simple-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ummahusla%2Freact-simple-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ummahusla","download_url":"https://codeload.github.com/ummahusla/react-simple-card/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248265621,"owners_count":21075011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["card","react"],"created_at":"2024-10-18T18:47:08.632Z","updated_at":"2025-04-10T18:04:58.345Z","avatar_url":"https://github.com/ummahusla.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Simple Card\n\n[![Build Status](https://travis-ci.org/ummahusla/react-simple-card.svg?branch=master)](https://travis-ci.org/ummahusla/react-simple-card) [![Coverage Status](https://coveralls.io/repos/github/ummahusla/react-simple-card/badge.svg?branch=master)](https://coveralls.io/github/ummahusla/react-simple-card?branch=master)\n\nSimple, easy to use and flexible cards in React.\n\n## Table of Contents\n\n-   [Installation](#installation)\n-   [Usage](#usage)\n-   [Examples](#examples)\n-   [Properties](#properties)\n\n## Installation\n\n```\nnpm install --save react-simple-card\n```\n\n## Usage\n\nThe simplest example.\n\n```js\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Card, CardHeader, CardBody, CardFooter } from 'react-simple-card';\n\nconst App = () =\u003e (\n    \u003cCard\u003e\n        \u003cCardHeader\u003eHeader\u003c/CardHeader\u003e\n        \u003cCardBody\u003eBody\u003c/CardBody\u003e\n        \u003cCardFooter\u003eFooter\u003c/CardFooter\u003e\n    \u003c/Card\u003e\n);\n\nrender(\u003cApp /\u003e, document.getElementById('root'));\n```\n\nThe simplest example with the `\u003cImageHeader\u003e` instead of `\u003cCardHeader\u003e`.\n\n```js\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Card, CardHeader, CardBody, CardFooter } from 'react-simple-card';\n\nconst App = () =\u003e (\n    \u003cCard\u003e\n        \u003cImageHeader imageSrc=\"http://via.placeholder.com/600x250\" /\u003e\n        \u003cCardBody\u003eBody\u003c/CardBody\u003e\n        \u003cCardFooter\u003eFooter\u003c/CardFooter\u003e\n    \u003c/Card\u003e\n);\n\nrender(\u003cApp /\u003e, document.getElementById('root'));\n```\n\n## Examples\n\n- [**Basic layout**](https://codesandbox.io/s/611monz7qz) - `Card`, `CardHeader`, `CardBody`, `CardFooter` \n- [**Basic layout with Image header instead**](https://codesandbox.io/s/k2kwznw6qv) - `Card`, `ImageHeader`, `CardBody`, `CardFooter` \n- [**Without header**](https://codesandbox.io/s/zqk7jvrnym) - `Card`, `CardBody`, `CardFooter` \n- [**Body only**](https://codesandbox.io/s/vnlxr3l6j0) - `Card`, `CardBody`\n\n## Properties\n\n### `\u003cCard\u003e`\n\n| Property    | Type     | Description                                                                                                                                        |\n| :---------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `children`  | Function | Allows to nest any components inside `\u003cCard\u003e` component. This is the place where to `\u003cCardHeader\u003e`, `\u003cImageHeader\u003e`, `\u003cCardBody\u003e`, `\u003cCardFooter\u003e`. |\n| `bgColor`   | String   | Allows to change the default `#fff` background.                                                                                                    |\n| `fontColor` | String   | Allows to change the default `#000` font color by passing a new value.                                                                             |\n| `style`     | Object   | Allows to pass an object of CSS styles, to update or overwrite the default ones.                                                                   |\n| `className` | String   | Allows to pass extra class names to the component.                                                                                                 |\n\n### `\u003cCardHeader\u003e`\n\n| Property    | Type     | Description                                                                                                                     |\n| :---------- | :------- | :------------------------------------------------------------------------------------------------------------------------------ |\n| `children`  | Function | Allows to render child elements inside the `\u003cCardHeader\u003e` component. Perfect section to place `\u003ch1\u003e`, `\u003ch2\u003e`, `\u003ch3\u003e`, etc tags. |\n| `style`     | Object   | Allows to pass an object of CSS styles, to update or overwrite the default ones.                                                |\n| `className` | String   | Allows to pass extra class names to the component.                                                                              |\n\n### `\u003cImageHeader\u003e`\n\n| Property    | Type   | Description                                                                      |\n| :---------- | :----- | :------------------------------------------------------------------------------- |\n| `imageSrc`  | String | Allows to pass the image URL which will be rendered inside the component.        |\n| `style`     | Object | Allows to pass an object of CSS styles, to update or overwrite the default ones. |\n| `className` | String | Allows to pass extra class names to the component.                               |\n\n### `\u003cCardBody\u003e`\n\n| Property    | Type     | Description                                                                                                    |\n| :---------- | :------- | :------------------------------------------------------------------------------------------------------------- |\n| `children`  | Function | Allows to render child elements inside the \u003cCardBody\u003e component. Good idea to use it to pass inner components. |\n| `style`     | Object   | Allows to pass an object of CSS styles, to update or overwrite the default ones.                               |\n| `className` | String   | Allows to pass extra class names to the component.                                                             |\n\n### `\u003cCardFooter\u003e`\n\n| Property    | Type     | Description                                                                      |\n| :---------- | :------- | :------------------------------------------------------------------------------- |\n| `children`  | Function | Allows to render child elements inside the \u003cCardFooter\u003e component.               |\n| `style`     | Object   | Allows to pass an object of CSS styles, to update or overwrite the default ones. |\n| `className` | String   | Allows to pass extra class names to the component.                               |\n\n## License\n\nMIT License\n\nCopyright (c) 2019 [Edvins Antonovs](https://twitter.com/edvinsantonovs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fummahusla%2Freact-simple-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fummahusla%2Freact-simple-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fummahusla%2Freact-simple-card/lists"}