Astryx

Astryx Info Tip

Component

About

An info icon that reveals help: a small "i" button. Hover and keyboard focus preview the help, and a click, tap, Enter, or Space pins it open until Escape, a second press, a press outside, or focus leaving. Use it next to labels, values, and metrics for permission notes, metric definitions, and field help. Its value over hand-composing Icon inside Tooltip is the pre-wired accessible trigger: a real button with an aria-label, Tab-reachable, tooltip on hover AND focus AND tap, and Escape dismissal. It follows the toggletip pattern: the button reports `aria-expanded="true"` while the help is pinned, and a screen reader hears the help once when it pins. Host `data-*` attributes reach the button; its name and disclosure attributes stay component-owned. Astryx by Meta. Source: https://astryx.atmeta.com/components/InfoTip

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

Code

How Astryx Info Tip 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-info-tip.tsx. */

import '@/components/ui/astryx-info-tip-utils/astryx-preview.css';
import {InfoTip} from '@/components/ui/astryx-info-tip';
import {HStack, VStack} from '@astryxdesign/core/Stack';
import {Text} from '@astryxdesign/core/Text';

function OfficialSample() {
  return (
    <VStack gap={1}>
      <HStack gap={1} align="center">
        <Text type="label" color="secondary">
          Rolling average
        </Text>
        <InfoTip
          content="30-day rolling average, recomputed nightly."
          label="About this metric"
        />
      </HStack>
      <Text type="display-3">1,284</Text>
    </VStack>
  );
}

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: 330}}>
        <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