Thursday, August 28, 2025
HomeLanguagesReact.js Blueprint Component Tab

React.js Blueprint Component Tab

React.js Blueprint is a front-end UI toolkit. It is very optimized and popular for building interfaces that are complex data-dense for desktop applications.

The React.js Blueprint Tab Component acts as a wrapper that takes the properties of and is managed by its parent component Tabs.

React.js Blueprint Props:

  • children: Underlying elements serve as children.
  • className: It is a space-delimited list of class names to pass along to a child element.
  • disabled: It is a boolean value. It denotes whether the tab is disabled or not. It is true by default.
  • id: It denotes a unique identifier for this Tab container.
  • panel: It is used to denote the panel content.
  • panelClassName: It is a space-delimited string of class names applied to the tab panel container.
  • title: It denotes the content of the tab title element.

 

Syntax:

<Tab> ... </Tab >

Prerequisite: Introduction and Installation reactJS

Creating React Application and Module installation:

Step 1: Create the react project folder, for that open the terminal, and write the command npm create-react-app folder name, if you have already installed create-react-app globally. If you haven’t, install create-react-app globally using the command npm -g create-react-app or install locally by npm i create-react-app.

npm create-react-app project

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

cd project

Step 3:  now install the dependency by using the following command:

npm install @blueprintjs/core

Project Structure: It will look like this.

 

Example 1: We are importing the Tab from “@blueprintjs/core”. To apply the default styles of the components we are importing “@blueprintjs/core/lib/css/blueprint.css”. We are adding three Tab Components and passing different values to id, title, and panel props. 

App.js




import React from 'react'
import '@blueprintjs/core/lib/css/blueprint.css';
import { Tab } from "@blueprintjs/core";
  
function App() {
  
    return (
        <div style={{
            padding: 30
        }}>
            <h3>ReactJS Blueprint Tab Component</h3>
            <Tab id="0" title="Tab-1" panel={
                <p>Tab-1</p>
            } />
            <Tab id="1" title="Tab-2" panel={
                <a>Tab-2</a>
            } />
            <Tab id="2" title="Tab-3" panel={
                <span>Tab-3</span>
            } />
  
        </div >
    );
}
  
export default App;


Step to Run Application: Run the application using the following command from the project’s root directory.

npm start

Output:

 

Example 2: We are importing the  Classes and Tab from “@blueprintjs/core”. To apply the default styles of the components we are importing “@blueprintjs/core/lib/css/blueprint.css”. We are adding three Tab Component and passing different classNames and passing the prop disabled to the last component.

App.js




import React from 'react'
import '@blueprintjs/core/lib/css/blueprint.css';
import { Classes, Tab } from "@blueprintjs/core";
  
function App() {
  
    return (
        <div style={{
            padding: 30
        }}>
            <h3>ReactJS Blueprint Tab Component</h3>
            <Tab id="0" title="Tab-1"
                panelClassName={Classes.ELEVATION_2}
                className={Classes.ELEVATION_0} panel={
                    <p>Tab-1</p>
                } />
            <Tab id="1" title="Tab-2"
                className={Classes.ELEVATION_2}
                panel={
                    <a>Tab-2</a>
                } />
            <Tab id="2" title="disabled" disabled panel={
                <span>disabled</span>
            } />
  
        </div >
    );
}
  
export default App;


Step to Run Application: Run the application using the following command from the project’s root directory.

npm start

Output:

 

Reference: https://blueprintjs.com/docs/#core/components/tabs.tab

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32244 POSTS0 COMMENTS
Milvus
80 POSTS0 COMMENTS
Nango Kala
6615 POSTS0 COMMENTS
Nicole Veronica
11787 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11832 POSTS0 COMMENTS
Shaida Kate Naidoo
6728 POSTS0 COMMENTS
Ted Musemwa
7009 POSTS0 COMMENTS
Thapelo Manthata
6684 POSTS0 COMMENTS
Umr Jansen
6697 POSTS0 COMMENTS