Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • NextJS
  • Material UI
  • React Bootstrap
  • React Suite
  • Ant Design
  • Reactstrap
  • BlueprintJS
  • React Desktop
  • React Native
  • React Rebass
  • React Spring
  • React Evergreen
  • ReactJS
  • ReactJS
  • JS Formatter
  • Web Technology
Open In App
Next Article:
React Suite Affix Component
Next article icon

React Suite Tooltip Component

Last Updated : 23 Jun, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Tooltip component allows the user to display informative text when users hover over, focus on, or tap an element. We can use the following approach in ReactJS to use the React Suite Tooltip Component.

Tooltip Props:

  • children: It is used to denote the primary content.
  • classPrefix: It is used to denote the prefix of the component CSS class.
  • visible: It is used to indicate whether the component is visible or not.
  • arrow: Whether show the arrow indicator

Whisper Props:

  • container: It is used to set the rendering container.
  • delay: It is used to denote the delay time.
  • delayHide: It is used to denote the hidden delay time.
  • delayShow: It is used to show delay time.
  • onBlur: It is a function that is triggered on lose focus.
  • onClick: It is a function that is triggered on click event.
  • onEnter: It is a function that is triggered before the overlay transitions in.
  • onEntered: It is a function that is triggered after the overlay finishes transitioning in.
  • onEntering: It is a function that is triggered as the overlay begins to transition in.
  • onExit: It is a function that is triggered right before the overlay transitions out.
  • onExited: It is a function that is triggered after the overlay finishes transitioning out.
  • onExiting: It is a function that is triggered as the overlay begins to transition out.
  • onFocus: It is a function that is triggered to get focus.
  • onMouseOut: It is a function that is triggered on mouse leave event.
  • placement: It is used for the placement of the component.
  • preventOverflow: It is used to prevent floating element overflow.
  • speaker: It is used for the displayed component.
  • trigger: It is used for the triggering events.

Whisper Methods:

  • open: This method is used to display a tooltip.
  • close: This method is used to close the tooltip.

Creating React Application And Installing Module:

Step 1: Create a React application using the following command:

npx create-react-app foldername

Step 2: After creating your project folder i.e. foldername, move to it using the following command:

cd foldername

Step 3: After creating the ReactJS application, Install the required module using the following command:

npm install rsuite

Project Structure: It will look like the following.

Project Structure

Example: Now write down the following code in the App.js file. Here, App is our default component where we have written our code.

JavaScript
import React from 'react' import 'rsuite/dist/styles/rsuite-default.css';  import { Button, Tooltip, Whisper } from 'rsuite'  export default function App() {  return (      <div style={{      display: 'block', width: 700, paddingLeft: 30      }}>      <h4>React Suite Tooltip Component</h4>      <Whisper          trigger="click"         placement="bottom"         speaker={<Tooltip>Sample Tooltip Text!</Tooltip>}      >          <Button appearance="subtle">Open Tooltip</Button>      </Whisper>      </div>  );  } 

Step to Run Application: Run the application using the following command from the root directory of the project:

npm start

Output: Now open your browser and go to http://localhost:3000/, you will see the following output:

 

Example 2

In this example, we will learn about ,how can we add / remove arrow from tooltip using its prop, arrow

JavaScript
import React from 'react'  import "rsuite/dist/rsuite.min.css"; import { Button, Tooltip, Whisper } from 'rsuite'  export default function App() {   return (     <div style={{     display: 'block', width: 700, paddingLeft: 100   }}>   <h1 style={{color:'green'}}>GeeksforGeeks</h1>   <h3>React Suite Tooltip Component</h3>   <Whisper       placement="right"         speaker={<Tooltip   arrow>Required Text</Tooltip>}     >   <Button appearance="subtle">With Arrow</Button>   </Whisper>   <br/>   <hr/>   <Whisper           speaker={<Tooltip arrow={false}>Required Text</Tooltip>}     >   <Button appearance="subtle">Without Arrow</Button>   </Whisper>          </div> ); } 

 

OUTPUT

 

Reference: https://rsuitejs.com/components/tooltip/


Next Article
React Suite Affix Component
author
gouravhammad
Improve
Article Tags :
  • JavaScript
  • Web Technologies
  • ReactJS
  • React-Suite Components
  • React-Suite General
  • React-Suite

Similar Reads

  • React Suite
    React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The input component allows the user to allow the user to create a basic widget for getting the user input in a text field. We can use the following approach in R
    2 min read
  • LAYOUT

    • React Suite Container Basic Layout
      React suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application. In this article, we'll learn about React suite Container Basic La
      2 min read

    • React Suite FlexboxGrid Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. FlexboxGrid component allows the user to use 24 grids as it is a grid layout component that is implemented via CSS Flexbox. We can use the following approach in
      3 min read

    • React Suite Grid Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Grid component allows the user to provide 24 grids. It helps in achieving response design. We can use the following approach in ReactJS to use the React Suite Gr
      4 min read

    • React Suite Stack Wrap
      React suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application. In this article, we'll learn about React Suite Stack Wrap. A stac
      2 min read

    BUTTONS

    • React Suite Button Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Button Component allows the user to take actions, and make choices, with a single tap. We can use the following approach in ReactJS to use the React Suite Button
      3 min read

    STATUS

    • React Suite Badge Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Badge component allows the user to generate a small badge to the top-right of its children component. We can use the following approach in ReactJS to use the Rea
      2 min read

    • React Suite Loader Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Loader component allows the user to show the loading effect. It can be used to show the loading state, whenever required in our application. We can use the follo
      3 min read

    • React Suite Message Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Message component allows the user to show important tips on the page. We can use the following approach in ReactJS to use the React Suite Message Component. Mess
      3 min read

    • React Suite Notification Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Notification Component allows the user to display a notification message globally. We can use the following approach in ReactJS to use the React Suite Notificati
      2 min read

    • React Suite Progress Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Progress component allows the user to display the current progress of an operation flow. We can use the following approach in ReactJS to use the React Suite Prog
      3 min read

    • React Suite Placeholder Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Placeholder component allows the user to display the initial state before the component loaded. We can use the following approach in ReactJS to use the React Sui
      3 min read

    OVERLAYS

    • React Suite Drawer Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The Drawer component is a panel that slides in from the edge of the screen.  We can use the following approach in ReactJS to use the React Suite Drawer Component
      3 min read

    • React Suite Dropdown Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Dropdown component allows the user to provide navigation that uses a select picker if you want to select a value. We can use the following approach in ReactJS to
      3 min read

    • React Suite Modal Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Modal component allows the user to provide a solid foundation for creating dialogs, lightboxes, popovers, etc. We can use the following approach in ReactJS to us
      4 min read

    • React Suite Popover Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Popover Component allows the user to show the popup information that is trigger on some event over the parent window. We can use the following approach in ReactJ
      4 min read

    • React Suite Tooltip Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Tooltip component allows the user to display informative text when users hover over, focus on, or tap an element. We can use the following approach in ReactJS to
      3 min read

    NAVIGATION

    • React Suite Affix Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Affix component allows the user to wrap Affix around another component in order to make it stick to the viewport. We can use the following approach in ReactJS to
      2 min read

    • React Suite Breadcrumb Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Breadcrumb component allows the user to display the current page path and that too within a navigational hierarchy. We can use the following approach in ReactJS
      2 min read

    • React Suite Nav Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Nav component allows the user to provide a list of various forms of navigation menus. We can use the following approach in ReactJS to use the React Suite Nav Com
      3 min read

    • React Suite Navbar Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Navbar component allows the user to provide navigation at the top of the page. We can use the following approach in ReactJS to use the React Suite Navbar Compone
      2 min read

    • React Suite Sidenav Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Sidenav component allows the user to provide an easy way to navigate through your website. It is treated as the sidebar of the page. We can use the following app
      3 min read

    • React Suite Steps Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Steps component guides users through the steps of a task. It is a kind of navigation bar. We can use the following approach in ReactJS to use the React Suite Ste
      3 min read

    • React Suite Pagination Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Pagination component allows the user to select a specific page from a range of pages. We can use the following approach in ReactJS to use the React Suite Paginat
      3 min read

    MEDIA AND ICONS

    • React Suite Avatar Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Avatar component allows the user to display an avatar or brand. We can use the following approach in ReactJS to use the React Suite Avatar Component. Avatar Prop
      2 min read

    • React Suite Icons Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Icon Component allows the user to add icons to your application. Icons are commonly used in every application for UI purposes. We can use the following approach
      3 min read

    FORM

    • React Suite Form Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Form Component provides a way to make a form and take user input and then forward it to the server for further data processing. We can use the following approach
      4 min read

    • React Suite Components Form validation Input
      React Suite is a collection of beautiful and customizable components for ReactJS that makes building user interfaces easier. One essential component is the Input. It handles form validation and user input smoothly, showing helpful error messages. This makes it perfect for creating strong and user-fr
      3 min read

    • React Suite Form Validation Default Check
      React Suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application. In this article, we’ll learn about React Suite Form Validation De
      3 min read

    DATA ENTRY

    • React Suite AutoComplete Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. AutoComplete component allows the user to auto-completing the free text value with the option value. We can use the following approach in ReactJS to use the Reac
      3 min read

    • React Suite Cascader Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Cascader component is used as a cascade selection box. It helps the user in a Single selection of data with a hierarchical relationship structure. We can use the
      4 min read

    • React Suite CheckPicker Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. CheckPicker component allows the user to select multiple data. This component also supports grouping. We can use the following approach in ReactJS to use the Rea
      4 min read

    DATA DISPLAY

    • React Suite Calendar Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Calendar component allows the user to display data by the calendar. It is treated as a container for displaying data in the form of a calendar.  We can use the f
      2 min read

    • React Suite Carousel Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Carousel component allows the user to display a set of elements in a carousel. We can use the following approach in ReactJS to use the React Suite Carousel Compo
      2 min read

    • React Suite Divider Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Divider component allows the user to display a dividing line. We can use the following approach in ReactJS to use the React Suite Divider Component. Divider Prop
      2 min read

    • React Suite List Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. List component allows the user to display a list. We can use the following approach in ReactJS to use the React Suite List Component. List Props: bordered: It is
      2 min read

    • React Suite Table Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Table component allows the user to display rows of data. We can create tables using this component. We can use the following approach in ReactJS to use the React
      6 min read

    • React Suite Tag Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Tag component allows the user to provide a Tag for categorizing or markup. We can use the following approach in ReactJS to use the React Suite Tag Component. Tag
      2 min read

    • React Suite Timeline Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The timeline component allows the user to provide a vertical display timeline. We can use the following approach in ReactJS to use the React Suite Timeline Compo
      2 min read

    • React Suite Panel Component
      React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Panel component allows the user to display a content panel that supports folding panels. We can use the following approach in ReactJS to use the React Suite Pane
      2 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences