#17 Wizard - Two Views

Preview

  • Step 1

    Cart

  • Step 2

    Address

  • Step 3

    Payment

  • Step 1

    Cart

  • Step 2

    Address

  • Step 3

    Payment

HTML

SCSS


*, ::after, ::before {
  box-sizing: border-box;
}

/* css element */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;700;900&display=swap');

.card-wizard {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.1);
}

ul.wizard {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: center;
  align-items: center;

  li {
    width: 107px;
    
    &:last-child {
      width: auto;
    }
    
    .info {
      font-family: 'Fira Sans', sans-serif;
      margin-top: 15px;
      
      span {
        color: #8492A6;
        font-size: 12px;
        display: block;
        margin-bottom: 7px;
      }
      
      h4 {
        margin: 0;
        color: #8492A6;
        font-weight: 700;
        font-size: 14px;
      }
    }
    
    .circle {
      width: 32px;
      height: 32px;
      border-radius: 100%;
      background-color: #E0E5EA;
      position: relative;
      display: -ms-flexbox;
      display: flex;
      -ms-flex-wrap: wrap;
      flex-wrap: wrap;
      -ms-flex-align: center;
      align-items: center;
      justify-content: center;
      
      svg {
        width: 20px;
        vertical-align: middle;
        fill: #8492A6;
      }
      
      .progress-bar {
        position: absolute;
        width: 56px;
        height: 3px;
        background-color: #E0E5EA;
        left: 42px;
        
        .mobile {
          display: none;
        }
      }
    }
  }

  li.sucess {
      
    h4 {
      color: #3C4858;
    }
    
    .circle {
      background-color: #24AD5E;
      
      svg {
        fill: #ffffff;
      }
      
      .progress {
        height: 3px;
        background-color: #24AD5E;
      }
    }
  }

  li.open {
      
    h4 {
      color: #3C4858;
    }
    
    .circle {
      background-color: #0061FF;
        
      svg {
        fill: #ffffff;
      }

      .progress {
        height: 3px;
        background-color: #0061FF;
      }
    }
  }
}

ul.wizard.vertical {
  flex-direction: column;

  li {
    height: 107px;
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: flex-start;
    align-items: flex-start;
    
    &:last-child {
      height: auto;
    }
    
    .info {
      margin-top: 0;
      margin-left: 15px;
      padding-top: 10px;
    }
    
    .circle {  
      .progress-bar {
        position: absolute;
        width: 3px;
        height: 56px;
        background-color: #E0E5EA;
        left: 15px;
        top: 42px;
      }
    }
  }

  li.sucess {
    .circle {
      .progress {
        width: 3px;
        background-color: #24AD5E;
      }
    }
  }

  li.open {
    .circle {
      .progress {
        width: 3px;
        background-color: #0061FF;
      }
    }
  }
}

@media (max-width:767px) {
  ul.wizard {
    flex-direction: column;
    
    li {
      height: 107px;
      position: relative;
      display: -ms-flexbox;
      display: flex;
      -ms-flex-wrap: wrap;
      flex-wrap: wrap;
      -ms-flex-align: flex-start;
      align-items: flex-start;
      
      &:last-child {
        height: auto;
      }
      
      .info {
        margin-top: 0;
        margin-left: 15px;
      }
      
      .circle {
        .progress-bar {
          position: absolute;
          width: 3px;
          height: 56px;
          background-color: #E0E5EA;
          left: 15px;
          top: 42px;
          
          .desktop {
            display: none;
          }
          
          .mobile {
            display: block;
          }
        }
      }
    }
    
    li.sucess {
      .circle {
        .progress {
          width: 3px;
          background-color: #24AD5E;
        }
      }
    }
    
    li.open {
      .circle {
        .progress {
          width: 3px;
          background-color: #0061FF;
        }
      }
    }
  }
}


Notes

In the code you can replace the images, icons and font. For icons and font you may have to change the size in the css.

Help the Project

Your help is important for the success of this project. We will make this project grow for everyone.