Directory

← Back

Carousel Addon

Addon that renders a carousel component

Author

Contributors

Rating

This is a carousel addon, based on the @xpertsea/paper-slider webcomponent

Sample code

	Slide s1 = new Slide(createSlideContent("Slide 1","green"));
	Slide s2 = new Slide(createSlideContent("Slide 2","blue"));
	Slide s3 = new Slide(createSlideContent("Slide 3","red"));
	Slide s4 = new Slide(createSlideContent("Slide 4","yellow"));

	Carousel c = new Carousel(s1,s2,s3,s4);
	c.setWidth("100%");
	c.setHeight("180px");
	c.addChangeListener(e->Notification.show("changed!",1000,Position.BOTTOM_END));
	c = new Carousel(s1,s2,s3,s4)
			.withAutoProgress()
			.withSlideDuration(4)
			.withStartPosition(1);
	c.addChangeListener(e->Notification.show("changed!",1000,Position.BOTTOM_END));
	Button next = new Button(">>");
	next.addClickListener(e->cf.moveNext());
	Button prev = new Button("<<");
	prev.addClickListener(e->cf.movePrev());
	Button last = new Button(">|");
	last.addClickListener(e->cf.movePos(3));
	Button first = new Button("|<");
	first.addClickListener(e->cf.movePos(0));

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release.

Released
2018-07-23
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 10
Vaadin 11
Vaadin 12
Vaadin 13
Vaadin 14+ in 2.0.0
Browser
Browser Independent

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online