Color Generator

Generate and export Tailwind color patterns.

Brand Colors

primary
secondary

State Colors

info
success
warning
error

Color Picker

Cards

A flexible card component for displaying content such as titles, descriptions, tags, authors, and more.

The Cards component provides an adaptable layout with various configurations, including optional icons, authors, tags, and alignment.

Installation

npx pixelblock-cli add Cards

This will copy the Cards.tsx file from the PixelBlock templates to your project's components/PixelBlock directory.

your-project/
├── components/
│   └── PixelBlock/
│       └── Cards.tsx
└── ...

Usage

After installing the Cards component, you can use it in your Next.js or React application.

Example: Simple Card

import React from "react";
import Cards from "./components/PixelBlock/Cards";

const App = () => (
  <div>
    <Cards
      blok={{
        date: "22 June 2020",
        title: "Sed ut perspiciatis unde omnis at vero blanditils",
        description:
          "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.",
        tags: ["Proxy", "VPN"],
        readMoreLink: "/blog/sed-ut-perspiciatis-unde-omnis", // Added Read More link
      }}
    />
  </div>
);

export default App;

Props

Cards Props

PropTypeDefaultDescription
blokBlokProps{}Object containing the card's content and data.
variant"center", "left", "right""left"Text alignment and layout direction.
shadow"sm", "md", "lg""md"Shadow intensity for the card.
radius"sm", "md", "lg""md"Border radius for the card.
childrenReactNodeundefinedCustom content to be rendered inside the card.

BlokProps

PropTypeDefaultDescription
iconReactNodeundefinedAn optional icon to display on the card.
titlestringundefinedThe title of the card.
descriptionstringundefinedThe main description text for the card.
datestringundefinedA date string to display on the card.
imagestringundefinedURL for an image to display on the card.
readMoreLinkstringundefinedA link for additional content or details.
tagsstring[]undefinedArray of tags to display as labels.
author{ name: string, role: string }undefinedAn object containing author name and role.

Examples

Card with Static Data

22 June 2020

Sed ut perspiciatis unde omnis at vero blanditils

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.

Read More

Card with Author and Title (Testimonial/Quote)

Web development has evolved rapidly over the last decade. Learn about the latest trends and technologies.

John Doe
Senior Developer

Card with Tags

22 June 2020

Sed ut perspiciatis unde omnis at vero blanditils

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.

ProxyVPN
22 June 2020

Sed ut perspiciatis unde omnis at vero blanditils

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores.

ProxyVPN

Multiple Cards Example

Future of AI in Web Development
22 June 2020

Future of AI in Web Development

AI is reshaping the web development landscape. Find out how AI tools are improving workflows and optimizing designs.

Read More
Sustainable Web Practices
22 June 2020

Sustainable Web Practices

Learn how developers can contribute to sustainability by adopting eco-friendly web practices and optimizing performance.

Read More