Add-on Directory

Flip Layout - Vaadin Add-on Directory

A flippable layout component for Vaadin Flip Layout - Vaadin Add-on Directory
This component implements a flashcard-style flippable layout for Vaadin. It has API for: - Flipping the component between front and back components - Setting the front and back content - Setting the direction of the flip (right, left, down, or up) - Setting the speed of the flip animation Added in 1.1.0: - Adding a listener for the flip event Example usage: ```java FlipLayout layout = new FlipLayout(frontComponent, backComponent); layout.addThemeVariants(FlipLayoutVariant.FAST); // Make the flip animation faster layout.setDirection(FlipLayout.Direction.LEFT); // Make the flip animation go to the left rather than the right layout.addClickListener(e -> layout.flip()); // Flip on click layout.addFlipListener(e -> { if (e.isFlipped()) { // do something } else { // do something else } } ``` Demo: https://v-herd.eu/flip-layout-demo/ Demo source: https://github.com/MatthewVaadin/flip-layout-demo
View on GitHub
Online Demo

Flip Layout version 1.0.0
Initial release

Flip Layout version 1.1.0
- Added an enum for directions (`FlipLayout.Direction`) and corresponding setter (`FlipLayout::setDirection(FlipLayout.Direction)`). - Added method for listening to the flip event (`FlipLayout::addFlipListener(FlipListener)`). - Improved transitions when switching between directions.