2.1.11 • Published 7 months ago

flex-card v2.1.11

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Flex Card

A flexible and customizable React component for rendering e-cards with Tailwind CSS.

Version: 2.1.11

Author: Nouman Azam

npm version License: MIT

Features

  • Supports various types of content including images, titles, text, buttons, and embedded videos (YouTube and MP4).
  • Allows for creating single or multiple cards with a flexible layout (horizontal or vertical).
  • Includes a tabbed interface for displaying multiple card groups.
  • Provides a carousel feature for displaying a set of cards in a scrollable format.
  • Supports custom CSS classes for easy styling and theming.
  • Lightweight and easy to integrate into your React project.

Installation

npm install flex-card

Usage

import { DefineCard } from "flex-card";

const cardData = [
  {
    type: "image",
    source: "https://example.com/image.jpg",
    text: "Image Caption",
  },
  {
    type: "title",
    text: "Card Title",
  },
  {
    type: "text",
    text: "This is some sample text content.",
  },
  {
    type: "button",
    text: "Click Me",
    url: "https://example.com",
  },
];

const App = () => {
  return (
    <div>
      <DefineCard content={cardData} />
    </div>
  );
};

Customization

You can customize the appearance of the cards by passing in additional CSS classes through the customClassNames prop:

<DefineCard
  content={cardData}
  customClassNames={{
    imageWrapper: "my-custom-image-wrapper",
    image: "my-custom-image",
    title: "my-custom-title",
    text: "my-custom-text",
    btn: "my-custom-button",
  }}
/>

Dependencies

The flex-card package has the following peer dependencies:

  • embla-carousel-react
  • lucide-react
  • react
  • react-dom
  • react-markdown
  • @headlessui/react

Make sure to install these dependencies in your project.

License

This project is licensed under the MIT License.

2.1.11

7 months ago

2.2.1

7 months ago

2.1.8

7 months ago

2.1.7

7 months ago

2.1.9

7 months ago

2.1.10

7 months ago

2.1.6

8 months ago

2.1.5

8 months ago

2.1.2

8 months ago

2.1.1

8 months ago

2.1.4

8 months ago

2.1.3

8 months ago

2.0.9

8 months ago

2.0.10

8 months ago

2.0.8

8 months ago

2.1.0

8 months ago

2.0.5

9 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.4

9 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago