Class WCStories
java.lang.Object
com.vaadin.flow.component.Component
com.flowingcode.vaadin.addons.wcstories.WCStories
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasComponents,HasElement,HasEnabled,Serializable
@Tag("wc-stories")
@NpmPackage(value="web-animations-js",version="2.3.2") @NpmPackage(value="@gugadev/wc-stories",version="1.0.0") @NpmPackage(value="custom-elements-native-shim",version="1.0.0")
@JsModule("web-animations-js/web-animations.min.js") @JsModule("./storify/dist/index.js")
public class WCStories
extends Component
implements HasComponents
Wrapper for web component https://github.com/gugadev/wc-stories
This component shows a group of images like Instagram stories or Whatsapp states.
- Author:
- Paola De Bartolo / Flowing Code
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetDuration(Integer duration) Sets visibility time of images and animation.voidSets stories height.voidSets border radius.voidsetStartAt(Integer startAt) Sets initial image index to show.voidsetStories(List<WCStoriesStory> stories) Add thestories/imagesto the container.voidSets stories width.voidsetWithShadow(Boolean withShadow) Enable or disable shadow in the container.Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Constructor Details
-
WCStories
-
-
Method Details
-
setRadius
Sets border radius. Default radius value: 0.- Parameters:
radius-
-
setStartAt
Sets initial image index to show. Default index value: 0.- Parameters:
startAt-
-
setDuration
Sets visibility time of images and animation. Default value: 5000.- Parameters:
duration-
-
setHeight
Sets stories height. Default value: 480px.- Parameters:
height-
-
setWidth
Sets stories width. Default value: 320px.- Parameters:
width-
-
setWithShadow
Enable or disable shadow in the container. Default value: disabled (false).- Parameters:
withShadow-
-
setStories
Add thestories/imagesto the container.- Parameters:
stories-
-