Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • 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
  • 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:
ReactJS Blueprint Introduction
Next article icon

ReactJS Blueprint Introduction

Last Updated : 14 May, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. This is not a mobile-first UI toolkit.

Installation: First install node.js in your machine and then install the package and its dependencies with an NPM client through npm or yarn:

npm i @blueprintjs/core  // or  yarn add @blueprintjs/core react react-dom

After installation, you'll be able to import the React components in your application like:

import { Button } from "@blueprintjs/core";

Don't forget to include the main CSS file from each Blueprint package, Additionally, the directory contains supporting media.

Using node-style package resolution in a CSS file: 

@import "~normalize.css";  @import "~@blueprintjs/core/lib/css/blueprint.css";  @import "~@blueprintjs/icons/lib/css/blueprint-icons.css";

or using plain old HTML

<link href="path/to/node_modules/normalize.css/normalize.css" rel="stylesheet" /> <link href="path/to/node_modules/@blueprintjs/core/lib/css/blueprint.css" rel="stylesheet" /> <link href="path/to/node_modules/@blueprintjs/icons/lib/css/blueprint-icons.css" rel="stylesheet" />

Blueprint components require the following ES2015 features:

  • Map
  • Set
  • Array.prototype.fill
  • Array.prototype.from
  • String.prototype.startsWith
  • Object.values

Blueprint is written in TypeScript, and it is having its own ".d.ts" file, therefore its ".d.ts" type definitions are distributed in the NPM package and should be resolved automatically by the compiler. 

However, you'll need to install typing for Blueprint's dependencies before you can consume it:

npm install --save @types/react @types/react-dom

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

Step 1: Create a react app appname:

npx create-react-app appname

Step 2: Change directory to app name:

cd appname

Step 3: Install the dependency:

npm i @blueprintjs/core  // or  yarn add @blueprintjs/core react react-dom

Project Structure: Now, the folder structure will look like this:

 

Example 1: In this example, we will use the menu component of Reactjs Blueprint. Now write down the following code in the App.js file. Here, App is our default component where we have written our code.

App.js
import React from 'react' import '@blueprintjs/core/lib/css/blueprint.css'; import { Menu, Classes, MenuItem, MenuDivider,      Icon } from "@blueprintjs/core";  function App() {     return (         <div style={{             display: 'block', width: 400, padding: 30         }}>             <h4>ReactJS Blueprint Menu Component</h4>             <Menu className={Classes.ELEVATION_1}>                 <MenuItem icon={<Icon icon="home" />} text="Home" />                 <MenuDivider />                 <MenuItem icon="new-link" text="WebLinks" />                 <MenuItem icon="user" text="Profile" />                 <MenuDivider />                 <MenuItem icon="cog" text="Setting" />             </Menu>         </div >     ); }  export default App; 

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 the dialog component in Reactjs Bueprint.

App.js
import React from 'react' import '@blueprintjs/core/lib/css/blueprint.css'; import { Dialog, Classes } from "@blueprintjs/core";  function App() {     return (         <div style={{             display: 'block', width: 400, padding: 30         }}>             <h4>ReactJS Blueprint Dialog Component</h4>             <Dialog                 title="Dialog Title"                 icon="info-sign"                 isOpen={true}             >                 <div className={Classes.DIALOG_BODY}>                     <p>                         Sample Dialog Content to display!                     </p>                 </div>             </Dialog>         </div>     ); }  export default App; 

Output:

 

Next Article
ReactJS Blueprint Introduction

K

kartik
Improve
Article Tags :
  • Web Technologies
  • ReactJS

Similar Reads

    ReactJS Blueprint Card Component
    BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Card Component is used as a simple rectangular container, and it is used when the user wants to display content related to a s
    2 min read
    ReactJS Blueprint Button Component
    BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Button Component provides a way for users to take actions, and make choices, with a single tap. We can use the following appro
    3 min read
    ReactJS Blueprint Dialog Component
    BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Dialog Component allows the user to show content on top of an overlay that requires user interaction. We can use the following
    7 min read
    ReactJS Blueprint InputGroup Component
    BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. InputGroup Component provides a way for users to provide them a text input. It is a basic component to collect data from the u
    4 min read
    ReactJS Blueprint Callout Component
    BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Callout Component provides a way for users to visually highlight important content for the user. We can use the following appr
    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