Progresso
O indicador de progresso representa visualmente o progresso do usuário dentro de um fluxo de navegação definido por etapas.
Anatomia
Concluído
Passo 1
Ativo
1 Passo 1
Contador
Etapa concluída
1
Etapa corrente
2
Próxima etapa
3
Passo a passo
Etapa concluída
Passo 1
Etapa corrente
2 Passo 2
Próxima etapa
3 Passo 3
Linha de progresso
25%
50%
75%
100%
Código
HTML
Exibir código
Copiar código

<div class="progress counter">
<span class="number">1</span>
</div>
SASS
Exibir código
Copiar código

.progress{
.done{
display: block;
width: 24px;
height: 24px;
background-image: url(/img/done.svg);
background-repeat: no-repeat;
}
.number{
display: block;
width: 24px;
height: 24px;
border-radius: 12px;
padding-top: 4px;
box-sizing: border-box;
background-color: #9b9b9b;
font-family: Lato;
font-size: 0.75em;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: 1.5;
letter-spacing: normal;
text-align: center;
color: #ffffff;
}
.step{
display: block;
font-family: Lato;
font-size: 1em;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.5;
letter-spacing: normal;
color: #9b9b9b;
padding-top: 10px;
}
.percent{
display: block;
margin-top:15px;
width: 100%;
height: 1px;
background-color: #f1f1f1;
&:before{
content: "";
position: relative;
display: block;
width: 100%;
background-color: #9b9b9b;
height: 5px;
bottom: 5px;
left: 0;
transition: .4s;
}
&.percent-25:before{
width: 25%;
border-radius: 0 7px 7px 0;
}
&.percent-50:before{
width: 50%;
border-radius: 0 7px 7px 0;
}
&.percent-75:before{
width: 75%;
border-radius: 0 7px 7px 0;
}
&.percent-100:before{
width: 100%;
}
}
&.next{
.number{
background-color: transparent;
border: 1px solid #7f7f7f;
color: #7f7f7f;
}
.step{
font-weight: bold;
color: #7f7f7f;
}
}
&.active{
.number{
background-color: #3153f5;
}
.step{
font-weight: bold;
color: #3153f5;
}
.percent{
&:before{
background-color: #3153f5;
}
}
}
&.step-by-step{
span,
i {
display: inline-block;
}
.number{
position: relative;
top: -2px;
margin-right: 10px;
}
.done{
position: relative;
top: 3px;
margin-right: 10px;
}
}
&.line{
.percent{
background-color: #fff;
}
}
}
HTML
Exibir código
Copiar código

<div class="progress step-by-step">
<i class="done"></i>
<span class="step">Passo 1</span>
</div>
SASS
Exibir código
Copiar código

.progress{
.done{
display: block;
width: 24px;
height: 24px;
background-image: url(/img/done.svg);
background-repeat: no-repeat;
}
.number{
display: block;
width: 24px;
height: 24px;
border-radius: 12px;
padding-top: 4px;
box-sizing: border-box;
background-color: #9b9b9b;
font-family: Lato;
font-size: 0.75em;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: 1.5;
letter-spacing: normal;
text-align: center;
color: #ffffff;
}
.step{
display: block;
font-family: Lato;
font-size: 1em;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.5;
letter-spacing: normal;
color: #9b9b9b;
padding-top: 10px;
}
.percent{
display: block;
margin-top:15px;
width: 100%;
height: 1px;
background-color: #f1f1f1;
&:before{
content: "";
position: relative;
display: block;
width: 100%;
background-color: #9b9b9b;
height: 5px;
bottom: 5px;
left: 0;
transition: .4s;
}
&.percent-25:before{
width: 25%;
border-radius: 0 7px 7px 0;
}
&.percent-50:before{
width: 50%;
border-radius: 0 7px 7px 0;
}
&.percent-75:before{
width: 75%;
border-radius: 0 7px 7px 0;
}
&.percent-100:before{
width: 100%;
}
}
&.next{
.number{
background-color: transparent;
border: 1px solid #7f7f7f;
color: #7f7f7f;
}
.step{
font-weight: bold;
color: #7f7f7f;
}
}
&.active{
.number{
background-color: #3153f5;
}
.step{
font-weight: bold;
color: #3153f5;
}
.percent{
&:before{
background-color: #3153f5;
}
}
}
&.step-by-step{
span,
i {
display: inline-block;
}
.number{
position: relative;
top: -2px;
margin-right: 10px;
}
.done{
position: relative;
top: 3px;
margin-right: 10px;
}
}
&.line{
.percent{
background-color: #fff;
}
}
}
HTML
Exibir código
Copiar código

<div class="progress line active">
<span class="percent percent-25"></span>
</div>
SASS
Exibir código
Copiar código

.progress{
.done{
display: block;
width: 24px;
height: 24px;
background-image: url(/img/done.svg);
background-repeat: no-repeat;
}
.number{
display: block;
width: 24px;
height: 24px;
border-radius: 12px;
padding-top: 4px;
box-sizing: border-box;
background-color: #9b9b9b;
font-family: Lato;
font-size: 0.75em;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: 1.5;
letter-spacing: normal;
text-align: center;
color: #ffffff;
}
.step{
display: block;
font-family: Lato;
font-size: 1em;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.5;
letter-spacing: normal;
color: #9b9b9b;
padding-top: 10px;
}
.percent{
display: block;
margin-top:15px;
width: 100%;
height: 1px;
background-color: #f1f1f1;
&:before{
content: "";
position: relative;
display: block;
width: 100%;
background-color: #9b9b9b;
height: 5px;
bottom: 5px;
left: 0;
transition: .4s;
}
&.percent-25:before{
width: 25%;
border-radius: 0 7px 7px 0;
}
&.percent-50:before{
width: 50%;
border-radius: 0 7px 7px 0;
}
&.percent-75:before{
width: 75%;
border-radius: 0 7px 7px 0;
}
&.percent-100:before{
width: 100%;
}
}
&.next{
.number{
background-color: transparent;
border: 1px solid #7f7f7f;
color: #7f7f7f;
}
.step{
font-weight: bold;
color: #7f7f7f;
}
}
&.active{
.number{
background-color: #3153f5;
}
.step{
font-weight: bold;
color: #3153f5;
}
.percent{
&:before{
background-color: #3153f5;
}
}
}
&.step-by-step{
span,
i {
display: inline-block;
}
.number{
position: relative;
top: -2px;
margin-right: 10px;
}
.done{
position: relative;
top: 3px;
margin-right: 10px;
}
}
&.line{
.percent{
background-color: #fff;
}
}
}