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
  • React Tutorial
  • React Exercise
  • React Basic Concepts
  • React Components
  • React Props
  • React Hooks
  • React Router
  • React Advanced
  • React Examples
  • React Interview Questions
  • React Projects
  • Next.js Tutorial
  • React Bootstrap
  • React Material UI
  • React Ant Design
  • React Desktop
  • React Rebass
  • React Blueprint
  • JavaScript
  • Web Technology
Open In App
Next Article:
React Rebass Introduction
Next article icon

React Suite Introduction

Last Updated : 14 May, 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. It is a developer-friendly UI framework.

Installation: You can install it with the following command:

npm i rsuite  // or  yarn add rsuite

Now you can import suite components like:

import { Button } from 'rsuite';

Let’s understand it’s working with the help of examples.

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.

Example 1: In this example, we will use how to use the input component of ReactJS Suite.

App.js

import React from 'react'
import 'rsuite/dist/styles/rsuite-default.css';
import { Input } from 'rsuite';
  
export default function App() {
  
// State of our dream city
const [dreamCity, setDreamCity] = React.useState('')
  
return (
    <div style={{
    display: 'block', width: 700, paddingLeft: 30
    }}>
    <h4>React Suite Input Component</h4>
    <Input
        placeholder="Enter your dream city"
        onChange={(e) => setDreamCity(e)}
    />
    Dream City Value: {dreamCity}
    </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 see how to use domHelper component of ReactJS Suite. We will use the addTheStyling method to add the style to our element at the click of the button.

App.js

import React from 'react'
import 'rsuite/dist/styles/rsuite-default.css';
import { Button, DOMHelper } from 'rsuite';
const { addStyle } = DOMHelper;
  
export default class App extends React.Component {
  
// State holding initial style
constructor(props) {
    super(props);
    this.state = {
    htmlCode: '<div class="view"></div>'
    };
}
  
// Function to set the states with latest style
showView() {
    const htmlCode = this.container.innerHTML;
    this.setState({ htmlCode });
}
  
// Function to add the styles
addTheStyling() {
    addStyle(this.view, { 
        'margin-top': '16px', 
        'color': 'orange' 
    });
    this.showView();
}
  
render() {
    const { htmlCode } = this.state;
    return (
    <div>
        <h4>React Suite DOMHelper Component</h4>
        <Button appearance="primary" 
            onClick={() => this.addTheStyling()} >
            Click to Add Style
        </Button>
  
        <div>{htmlCode}</div>
        <div ref={ref => { this.container = ref }}>
        <div className="view" ref={ref => { this.view = ref }} />
        </div>
    </div>
    );
}
}
                      
                       

Output:

 

Features:

  • Server-Side Rendering(SSR): React Suite supports Server Side Rendering, Which supports Next.js to build applications.

Supported Platforms:

Browser’s Name Version
Internet Explorer>=11
Safari>= 10
Edge>=14
Firefox>= 45
Chrome>= 49

Supported development environment:

  • Supports React v16.0
  • Supports Typescript
  • Supports Electron
  • Supports Reason


Next Article
React Rebass Introduction
author
kartik
Improve
Article Tags :
  • ReactJS
  • Web Technologies

Similar Reads

  • React Introduction
    ReactJS is a component-based JavaScript library used to build dynamic and interactive user interfaces. It simplifies the creation of single-page applications (SPAs) with a focus on performance and maintainability. It is developed and maintained by Facebook.The latest version of React is React 19.Use
    8 min read
  • React Rebass Introduction
    React Rebass is a front-end framework that was designed keeping react in mind. React Rebass is built with a Styled System. It is the best choice to create prototypes and UI without needing to invest time in building a custom design system up-front. React Rebass provides us with flexible components.
    2 min read
  • Introduction to React-Redux
    React-Redux is a popular state management library that helps manage the application state in React applications. It is an essential tool in the React ecosystem, allowing you to efficiently handle complex state logic and data flow within large applications. React-Redux connects the Redux store to Rea
    7 min read
  • ReactJS Reactstrap Introduction
    Reactstrap is a bootstrap-based React UI library that is used to make good-looking webpages with its seamless and easy-to-use component. Reactstrap does not embed its own style, but it depends upon the Bootstrap CSS framework for its styles and theme. Prerequisites: Good knowledge of react.Good know
    2 min read
  • Intorduction to React Motion
    Animation plays a vital role in modern web development, enhancing user experience and adding a layer of interactivity to web interfaces. React Motion is a popular animation library specifically designed for React applications. This article will explore React Motion in detail, covering its key featur
    4 min read
  • React Suite Nav Props
    React Suite is a front-end library designed for the middle platform and back-end products. The React Suite Nav component acts as a navigator it allows the user to provide an easy way to navigate. The props are: classPrefix: This denotes the prefix of the component CSS class. Specifying any value her
    3 min read
  • 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 Buttons Props
    React Suite is a front-end library designed for the middle platform and back-end products. Button Component allows the user to interact with the webpage. The Button Component has a number of properties of its own like appearance, size, color, etc.  The props are: active: It is a boolean value. It de
    4 min read
  • Environment Protection Website using React
    Imagine building a website that champions environmental protection. That's exactly what we're aiming for with this project. We're crafting a space using React where people can learn, share, and engage in all things related to safeguarding our planet. Output Preview: Let us have a look at how the fin
    7 min read
  • React Suite Affix Props
    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. Affix is generally used for pages with long co
    3 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