New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cloudflare/component-tooltip

Package Overview
Dependencies
Maintainers
0
Versions
551
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/component-tooltip

Cloudflare Tooltip Component

  • 5.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by0.85%
Maintainers
0
Weekly downloads
 
Created
Source

@cloudflare/component-tooltip

Cloudflare Tooltip Component

Installation

Installation with yarn is recommended


$ yarn add @cloudflare/component-tooltip

Usage

import React from 'react';
import { Tooltip } from '../../src';
import { Icon } from '@cloudflare/component-icon';
import { Button } from '@cloudflare/component-button';
import { Box } from '@cloudflare/component-box';

const Jsx = () => (
  <span>
    <h4>
      <Icon type="exclamation-sign" color="danger" label="tooltip" /> Sure. No
      problem!
    </h4>
    Important Info
  </span>
);

const TooltipComponent = () => (
  <div>
    <div>
      <h4>Standard tooltip with text</h4>
      Lorem Ipsum is simply dummy text of the printing and typesetting industry.{' '}
      More Info{' '}
      <Box display="inline-block">
        <Tooltip
          place="top"
          message="It has survived not only five centuries, but also the leap into electronic
      typesetting, remaining essentially unchanged."
        >
          <Icon type="info-sign" color="primary" label="tooltip" />
        </Tooltip>
      </Box>
    </div>

    <h4>
      You can add a tooltip to any element you want. You can also use delayHide
      to delay the hiding of the tooltip
    </h4>
    <Box display="inline-block">
      <Tooltip delayHide={1000} place="top" message={"I'm on a button"}>
        <Button type="primary">Button Info</Button>
      </Tooltip>
    </Box>
    <h4>Can you do jsx?</h4>
    <Box display="inline-block">
      <Tooltip place="top" message={<Jsx />}>
        <span>Fancy Tooltip</span>
        <div />
      </Tooltip>
    </Box>
  </div>
);

export default TooltipComponent;

FAQs

Package last updated on 01 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc