Open In App

ReactJS Semantic UI Step Element

Semantic UI is a modern framework used in developing seamless designs for the website, It gives the user a lightweight experience with its components. It uses the predefined CSS, JQuery language to incorporate in different frameworks.

In this article we will know how to use the step element in ReactJS Semantic UI. Step element is used to track the completion of series of processes.



States:

Syntax:



<step>
  <step.content/>
</step>

 

Creating React Application And Installing Module:

Project Structure: It will look like the following.

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

npm start

Example 1: In this example we will be going to use icon and step elements to show completion status of activity by using ReactJS Semantic UI Step element.




import React from 'react'
import { Icon, Step } from 'semantic-ui-react'
  
const styleLink = document.createElement("link");
styleLink.rel = "stylesheet";
styleLink.href = 
document.head.appendChild(styleLink);
  
const Btt = () => (
<div>
    <br/>
    <Step.Group>
    <Step>
      <Icon name='html5'/>
      <Step.Content>
        <Step.Title>HTML</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
  
    <Step>
      <Icon name='js'/>
      <Step.Content>
        <Step.Title>JavaScript</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
  
    <Step>
      <Icon name='react'/>
      <Step.Content>
        <Step.Title>ReactJS</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
  
    <Step>
      <Icon name='angular'/>
      <Step.Content>
        <Step.Title>AngularJS</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
    </Step.Group>
      
</div>
)
  
  
export default Btt

Output: 

Example 2: In this example we will be going to use the icon and step elements with the disabled state so that step can show that it cannot be selected by using ReactJS Semantic UI Step element.




import React from 'react'
import { Icon, Step } from 'semantic-ui-react'
  
const styleLink = document.createElement("link");
styleLink.rel = "stylesheet";
styleLink.href = 
document.head.appendChild(styleLink);
  
const Btt = () => (
<div>
    <br/>
    <Step.Group>
    <Step>
      <Icon name='html5'/>
      <Step.Content>
        <Step.Title>HTML</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
  
    <Step>
      <Icon name='js'/>
      <Step.Content>
        <Step.Title>JavaScript</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
  
    <Step disabled>
      <Icon name='react'/>
      <Step.Content>
        <Step.Title>ReactJS</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
  
    <Step disabled>
      <Icon name='angular'/>
      <Step.Content>
        <Step.Title>AngularJS</Step.Title>
        <Step.Description>GeeksforGeeks</Step.Description>
      </Step.Content>
    </Step>
    </Step.Group>
      
</div>
)
  
  
export default Btt

Output:

Reference: https://react.semantic-ui.com/elements/step


Article Tags :