Modern Swiper functionality as addition to every SharePoint intranet web partMore and more organizations demand for responsive mobile friendly intranets. With the help of SharePoint modern pages, SharePoint Framework we can build nice swipe, touch based webparts and improve the user experience when a site is used from tablet or smart phone.
React Slide Swiper sample is an example of touch friendly responsive web partI recently submitted that sample to the SharePoint Patterns and Practices Github repo. The SPFx web part sample can be summarized in one image bellow, but there are more features implemented and can be controlled from the properties of the web part.
Here is a short video tutorial how the SPFx web part can be used and shot walk-through the code
React Slide Swiper with built-in properties so the slider can be configured
The sample comes with SPFx properties for controlling the slides on the page, autoplay, paging, navigation, different cursor or replay of the slides if all are displayed. More features can be added to the SPFx property pane since the Swiper has even more configuration options.
SharePoint responsive carousel web part
Solution packaging and bundle optimization considerations
Another advantage is that the Swiper library does not have dependencies on other heavy libraries like JQuery.
Using the SharePoint Framework allow us to use modern open source libraries like Swiper and quickly build solution for our customer without the need to reinvent the wheel. Take advantage of that now :)SharePoint Framework React Slide Swiper web part
How easy would this slider be to get the data from a sharepoint list instead of the sample data? I am new to the SP framework, but this is great just need it to pull from a list.
You should be able to easly implement a new ListService from the IListService that pulls data from SharePoint list. You can use the the PnP JS Core (https://github.com/pnp/pnp or https://github.com/SharePoint/pnp) to retrieve the data. More on work with lists here https://github.com/SharePoint/PnP-JS-Core/wiki/Working-With:-Items
Can u please send me the full code parts
for image slider
Here is the github url: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-slide-swiper
I package and deployed webpart in SharePoint online, Slider not working, Do i need to specify anything in config.json
Seems to be working just fine for me. Please note the skipFeatureDeployment property is not set so you will have to add the app in order the Swiper web part to appear in the toolbox. Just go to https://<YOUR_TENANT>.sharepoint.com/sites/<YOUR_SITE>/_layouts/15/addanapp.aspx then find the app and add it.
Doesn't work on classic sharepoint sites
I am able to swipe on the slides in desktop mode. But when viewing in mobile version, the slides are not being swiped left and right. Is it a known issue?
The slides are swipeable in the desktop view. But I am not able to swipe left and right on the slides when opened in mobile view. Is this a known issue?