Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

656
Visualizações
How to set an animation to Nebular Stepper with Angular as Material does it

When you change from one step to another in Angular Material you have a slide effect, is this possible with Nebular Stepper?

I mean a directive or something simple.

  1. Angular material Example
  2. Javascript vanilla from scratch
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You just need to wrap the content of the nb-step.

On your component.html

<nb-stepper>
    <nb-step>
        <div class="wrap" [ngClass]="{'next': isNext, 'back':!isNext}">
        </div>
    </nb-step>
</nb-stepper>

On your component.ts

  next(event: MouseEvent) {
    this.isNext = true;
    if (this.stepper?.steps.length === this.stepper?.selectedIndex) {
      this.stepper?.reset();
    } else {
      this.stepper?.next();
    }
  }

  back(event: MouseEvent) {
    this.isNext = false;
    if (this.stepper?.selectedIndex === 0) {
      this.stepper.selectedIndex = this.stepper?.steps.length - 1;
    } else {
      this.stepper?.previous();
    }
  }

On your scss component.scss:

.wrap.back {
    animation-name: slideRightToLeft;
    animation-duration: 1s;
}

.wrap.next {
    animation-name: slideLeftToRight;
    animation-duration: 1s;
}

@keyframes slideLeftToRight {
    0% {
        transform: translateX(-100vw);
    }
    100% {
        transform: translateX(0vw);
    }
}

@keyframes slideRightToLeft {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(0vw);
    }
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda