A React tooltip component from Radix UI Primitives, part of an open-source UI component library for building high-quality, accessible design systems and web apps
Overall
score
96%
Build a React component that displays helpful information cards that appear in different directions relative to their trigger buttons.
Create a DirectionalInfoCard component that:
direction prop that can be "top", "right", "bottom", or "left"buttonText prop for the trigger button labelinfoText prop for the information content to displaydirection prop@generates
import React from 'react';
export interface DirectionalInfoCardProps {
direction: 'top' | 'right' | 'bottom' | 'left';
buttonText: string;
infoText: string;
}
export function DirectionalInfoCard(props: DirectionalInfoCardProps): React.ReactElement;Provides tooltip positioning and interaction capabilities.
@satisfied-by
Core React library for building UI components.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-radix-ui--react-tooltipevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10