evolving the design of mui stepper

I am looking to customize the code below for my specific needs

I want to change the icon from

to this:

I am unable to modify the style and also need to add an intermediate step

I have included

, '.Mui-active': { color: '#1C6FC9', },
here is the link to the sandbox https://codesandbox.io/s/horizontalnonlinearstepper-demo-material-ui-forked-9pqxxk

Any assistance would be appreciated.

Answer №1

This solution involves adding a padding to the active icon and then creating a circular border around it.

".MuiSvgIcon-root.Mui-active": {
  padding: "3px",
  borderRadius: "50%",
  border: "1px solid #1976d2",
  marginY: "-4px"
}

The marginY: "-4px" property helps maintain balance between the padding and border, ensuring proper spacing. It is equivalent to combining marginTop and marginBottom, resulting in -4 + -4 = -8, which accounts for the combined difference in padding and border on both sides: 3 + 3 + 1 + 1 = 8.

Here is what the final result looks like:

Live Demo

https://codesandbox.io/s/horizontalnonlinearstepper-demo-material-ui-forked-u2yt0e?fontsize=14&hidenavigation=1&theme=dark

Answer №2

Kindly incorporate this CSS style into your code. I believe it will be effective

.css-1u4zpwo-MuiSvgIcon-root-MuiStepIcon-root.Mui-active {
    padding-right: 0;
    border: 2px solid #1C6FC9;
    border-radius: 50%;
    padding: 6px;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is preventing my accordion from closing completely?

I'm currently working on creating FAQ questions in an accordion format. However, I've encountered an issue where adding padding around the answer section prevents the accordion from closing completely. Removing the padding solves the problem, but ...

"Learn how to create a scrolling div using a combination of CSS and JavaScript with absolute and relative

After relying solely on "pre-made" components like Mui or TailWind, I decided to create a component using only CSS and maybe JavaScript. However, I encountered some difficulties when attempting to position a div inside an image using relative and absolute ...

Achieving centered positioning for the 'row' class in Foundation 5, regardless of browser size

While viewing on desktop, the body is centered which is ideal. However, resizing the browser causes it to stretch to fit the full width and I want to avoid this. Regardless of the browser size, I want the first div with the "row" class to be centered with ...

Every time I try to restart my React Project, it seems to encounter strange issues that

Currently, I am following a fullstack React tutorial which you can find here: React Tutorial I have encountered an issue where every time I close my laptop and reopen the project, npm start throws a strange error. Initially, I tried to fix it by starting ...

Encountering issues with resolving 'devextreme/animation/frame' when integrating devextreme with a react application

I'm running into an issue while trying to implement the devextreme datagrid table in React. Upon importing it, I encounter the following error: ./node_modules/devextreme-react/core/templates-renderer.js Module not found: Can't resolve 'devex ...

The Material UI Rating Component is malfunctioning and showing an incorrect value

I'm currently working on a component loop that takes in async data. Everything is rendering properly except for the first component, where the Rating component isn't displaying its value correctly (it just shows 0 stars). Here's the code: & ...

Problem with Bootstrap 3 navbar on mobile devices - not tappable or responsive

After years of using Bootstrap, I've come across a new issue with my implementation of a Bootstrap 3 Nav. While testing on a desktop browser with device emulation, the nav collapses and functions properly. However, when tapping on the header on an ac ...

One way to position a sidebar between two divs is to ensure it adjusts seamlessly to the size of the browser window when resized

In my layout, I have two grids: one for the header and one for the footer. In between these two grids, I am using a sidebar on the left side. Below is the JavaScript code I am using: function adjustSize() { var heights = window.innerHeight; docum ...

What steps can I take to address the eslint conflict that arises when there are props and module imports with identical names?

Currently, I am incorporating react along with react-redux and eslint. Within my container, I bring in an action that will be connected to the component's props in mapDispatchToProps as follows: // This is a simplified version import { getGames } fro ...

Is there a way to establish a minimum time for a MUI TextField with the type of 'time'?

I have a MUI TextField that is set to type='time'. I would like to establish a minimum time (potentially the current system time) so that users can only select times later than this minimum. Is there a method to accomplish this? <TextField i ...

Adjust the alignment of text to a precise vertical ratio of the image

Let's say I have this amazing logo with some artistic text in it that cannot be replicated using a downloaded WebFont In the image, the text baseline sits at 68% from the top and 32% from the bottom. Now I want to align text in an HTML document, whi ...

Resources for Vue.js stylesheets

Vue.js is my latest discovery and I have been experimenting with the single file component architecture. A small issue I encountered was that all of my components' styles were being loaded on the page, even if they weren't currently active. Is t ...

Sending a style prop to a React component

My typescript Next.js app seems to be misbehaving, or perhaps I'm just not understanding something properly. I have a component called <CluckHUD props="styles.Moon" /> that is meant to pass the theme as a CSS classname in order to c ...

Having trouble with image URLs not working in React JS?

I am currently encountering an issue with displaying an image in my project. I have provided a relative path in the src properties, but unfortunately, it is not working as expected. If anyone has any suggestions or solutions to offer, please feel free to ...

Currently, I am compiling a list of tasks that need to be completed, but I am encountering a dilemma that is proving difficult to resolve

Recently delved into the world of Javascript and encountered a roadblock that I can't seem to overcome. Here's the snippet of code causing me trouble: add = document.getElementById("add"); add.addEventListener("click", () => { console.log("Ple ...

Ways to delete a CSS attribute with jquery

Is there a way to eliminate a CSS property from a class without setting it to null? Let's say I have a class called myclass with the property right:0px. I want to completely remove right:0px from my class, not just set it to null. How can I achieve th ...

Can a submit button be created that integrates both a radio button and submission functionality?

Is there a way to combine a radio button and submit button into one element for submitting the value just with a click? Currently, I have a radio button and a separate submit button in my code, but I want to streamline it. This is the current code snippet ...

Sending properties to styled components in React

Looking to pass mouse hover effect to a custom styled component since the 'div' hover selector isn't possible. Here's what I attempted: In NavLinkItem.tsx: const NavLinkItem = styled("li")<{ mouseEnter: any }>(({ theme, mouseEnt ...

What could be causing the state to not update as anticipated?

I am currently in the process of developing a TicTacToe game and have a requirement to maintain the current player in state under the name currentPlayer. The idea is that after one player makes a move, I need to update currentPlayer to represent the opposi ...

Error: Unable to locate Buffer2

I encountered the error Uncaught TypeError: Buffer2 is undefined when trying to import jsonwebtoken into my React project. The errors occur with both import jwt from jsonwebtoken and import {decode} from 'jsonwebtoken'. My versions are jsonwebt ...