Astryx

Astryx Hover Card

Cards

About

Component wrapper for hover card display: a richer, larger overlay triggered on hover or focus. Astryx by Meta. Source: https://astryx.atmeta.com/components/HoverCard

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

Code

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

Usage.tsx

'use client';

/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-hover-card.tsx. */

import '@/components/ui/astryx-hover-card-utils/astryx-preview.css';
import {HoverCard} from '@/components/ui/astryx-hover-card';
import {Button} from '@astryxdesign/core/Button';
import {Stack} from '@astryxdesign/core/Layout';
import {Text, Heading} from '@astryxdesign/core/Text';
import {Avatar} from '@astryxdesign/core/Avatar';

function OfficialSample() {
  return (
    <HoverCard
      placement="above"
      content={
        <Stack direction="vertical" gap={2} style={{width: 240}}>
          <Stack direction="horizontal" gap={2} vAlign="center">
            <Avatar name="Jane Doe" size="lg" />
            <Stack direction="vertical" gap={0}>
              <Heading level={5}>Jane Doe</Heading>
              <Text type="supporting" color="secondary">
                Software Engineer
              </Text>
            </Stack>
          </Stack>
          <Text type="body" color="secondary">
            Building great products with great people.
          </Text>
        </Stack>
      }>
      <Button label="@janedoe" variant="ghost" />
    </HoverCard>
  );
}

export default function Demo() {
  return (
    <div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
      <div className="astryx-demo-content" data-centered style={{maxWidth: 320}}>
        <OfficialSample />
      </div>
    </div>
  );
}

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    61
  • Astryx Avatar

    Astryx Avatar

    34
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    32
  • Astryx Badge

    Astryx Badge

    30
  • Astryx Button Group

    Astryx Button Group

    29
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    27
  • Astryx Toggle Button

    Astryx Toggle Button

    17
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    10

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Weather Card

    Weather Card

    69
  • Statistics Card 7

    Statistics Card 7

    340
  • Stats cards with links

    Stats cards with links

    102
  • Statistics Card 2

    Statistics Card 2

    316
  • Approval Card

    Approval Card

    37
  • Recipe Card

    Recipe Card

    53
  • The Item one

    The Item one

    4