tigran tumasov

Context Card

Cards 17

About

Tooltip

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Context Card to your project and fits it to your theme.

Code

How Context Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import React from "react";
import { ContextCard } from "@/components/ui/context-card";

export const Demo = () => {
  return (
    <div className="flex flex-col gap-8">
      <div className="flex flex-col gap-2 px-96 w-full">
        <div className="flex justify-between gap-4">
          <ContextCard.Trigger
            content="The Evil Rabbit Jumped over the Fence"
            side="top"
          >
            <span className="dark:text-white">Top</span>
          </ContextCard.Trigger>
          <ContextCard.Trigger
            content="The Evil Rabbit Jumped over the Fence"
            side="bottom"
          >
            <span className="dark:text-white">Bottom</span>
          </ContextCard.Trigger>
          <ContextCard.Trigger
            content="The Evil Rabbit Jumped over the Fence"
            side="left"
          >
            <span className="dark:text-white">Left</span>
          </ContextCard.Trigger>
          <ContextCard.Trigger
            content="The Evil Rabbit Jumped over the Fence"
            side="right"
          >
            <span className="dark:text-white">Right</span>
          </ContextCard.Trigger>
        </div>
      </div>

    </div>
  );
};

export const Top = () => (
    <div className="flex flex-col">
        <div className="flex justify-between gap-4">
            <ContextCard.Trigger
                content="The Evil Rabbit Jumped over the Fence"
                side="top"
            >
                <span className="dark:text-white">Hover Me - Top</span>
            </ContextCard.Trigger>
        </div>
    </div>
)

export const Bottom = () => (
    <div className="flex flex-col">
        <div className="flex justify-between gap-4">
            <ContextCard.Trigger
                content="The Evil Rabbit Jumped over the Fence"
                side="bottom"
            >
                <span className="dark:text-white">Hover Me - Bottom</span>
            </ContextCard.Trigger>
        </div>
    </div>
)

export const Left = () => (
    <div className="flex flex-col">
        <div className="flex justify-between gap-4">
            <ContextCard.Trigger
                content="The Evil Rabbit Jumped over the Fence"
                side="left"
            >
                <span className="dark:text-white">Hover Me - Left</span>
            </ContextCard.Trigger>
        </div>
    </div>
)

export const Right = () => (
    <div className="flex flex-col">
        <div className="flex justify-between gap-4">
            <ContextCard.Trigger
                content="The Evil Rabbit Jumped over the Fence"
                side="right"
            >
                <span className="dark:text-white">Hover Me - Right</span>
            </ContextCard.Trigger>
        </div>
    </div>
)

Dependencies

More by tigran tumasov

View all
  • Product Hunt Badge

    Product Hunt Badge

    2K
  • Book

    Book

    189
  • Calendar

    Calendar

    157
  • Theme Switcher

    Theme Switcher

    143
  • Table

    Table

    125
  • Snippet

    Snippet

    125
  • Toggle

    Toggle

    100
  • Feedback

    Feedback

    95

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Photo Deck

    Photo Deck

    47
  • Folded Card

    Folded Card

    45
  • Statistics Card 10

    Statistics Card 10

    304
  • Statistics Card 2

    Statistics Card 2

    309
  • Statistics Card 7

    Statistics Card 7

    336
  • CTA Section

    CTA Section

    6
  • Liquid Glass Card

    Liquid Glass Card

    198