2.1.11 • Published 1 year ago

flex-card v2.1.11

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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

1 year ago

2.2.1

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.9

1 year ago

2.1.10

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.0.9

1 year ago

2.0.10

1 year ago

2.0.8

1 year ago

2.1.0

1 year ago

2.0.5

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago