java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
com.vaadin.componentfactory.addons.splide.Splide
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, Serializable

@NpmPackage(value="@splidejs/splide",version="3.6.12") @NpmPackage(value="@splidejs/splide-extension-video",version="0.6.8") @JsModule("./src/vcf-splide.js") @CssImport("@splidejs/splide/dist/css/splide.min.css") @CssImport("@splidejs/splide-extension-video/dist/css/splide-extension-video.min.css") @CssImport("./styles/splide.css") public class Splide extends com.vaadin.flow.component.html.Div
Splide component definition. Splide uses splide library to display images and videos as a carousel (see more at https://github.com/Splidejs/splide).
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

    com.vaadin.flow.component.HasText.WhiteSpace
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Splide(List<? extends Slide> slides)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSlide(Slide slide)
    Add a new slide to the splide carousel.
    void
    Remove all current slides present in the carousel.
    Return the list of slides that are currently part of the splide component.
    boolean
    Returns if the images are being cropped or not.
    protected void
    onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
     
    protected void
    onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
     
    void
    setImageTrueSize(boolean imageTrueSize)
    Slide images usually have different aspect ratios.
    void
    setSlides(List<Slide> slides)
    Set the list of the slides to be displayed by the splide component.

    Methods inherited from class com.vaadin.flow.component.HtmlComponent

    getTitle, setTitle

    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, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents

    getChildren, getComponentAt, getComponentCount, indexOf, replace

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasText

    getText, getWhiteSpace, setText, setWhiteSpace
  • Constructor Details

    • Splide

      public Splide()
    • Splide

      public Splide(List<? extends Slide> slides)
  • Method Details

    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
      Overrides:
      onAttach in class com.vaadin.flow.component.Component
    • onDetach

      protected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
      Overrides:
      onDetach in class com.vaadin.flow.component.Component
    • getSlides

      public List<Slide> getSlides()
      Return the list of slides that are currently part of the splide component.
      Returns:
      the list of the slides
    • setSlides

      public void setSlides(List<Slide> slides)
      Set the list of the slides to be displayed by the splide component.
      Parameters:
      slides - the list of slides to display
    • addSlide

      public void addSlide(Slide slide)
      Add a new slide to the splide carousel.
      Parameters:
      slide - the new slide to add
    • clearSlides

      public void clearSlides()
      Remove all current slides present in the carousel.
    • isImageTrueSize

      public boolean isImageTrueSize()
      Returns if the images are being cropped or not. By default, this flag is set to true.
      Returns:
      true, if images are shown in true size.
    • setImageTrueSize

      public void setImageTrueSize(boolean imageTrueSize)
      Slide images usually have different aspect ratios. We can tell the component to show them in true size or to crop them so they all have the same size to fit container. If this flag is set true, images will be shown in true size, if not, images will be cropped.
      Parameters:
      imageTrueSize -