question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I place controls outside of the swipable area?

See original GitHub issue

@surmon-china could you add an example of the swiper with arrows outside of the swipable area and how can that be achieved with the current swiper architecture? I would like to get this look https://take.ms/YC1Zw Right now swiper class get overflow-hidden by default that means that controls will cut off if a negative margin is applied. Please, help me understand how to work around this issue?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
surmon-chinacommented, Apr 9, 2020

@AndrewBogdanovTSS

  1. remove navigation option from swiperOptions
  2. remove navigation slot element
  3. custom element and bind event to control the swiper

e.g.

<div class="container">
  <swiper ref="swiper">
    <swiper-slide>Slide 1</swiper-slide>
  </swiper>
  <div class="navigation">
    <button @click="prev">Prev</button>
    <button @click="next">Next</button>
  </div>
</div>
prev() {
  this.$refs.swiper.$swiper.slidePrev()
},
next() {
  this.$refs.swiper.$swiper.slideNext()
}
0reactions
AndrewBogdanovTSScommented, Apr 29, 2020

@johnyluyte yeah, I also end up with similar solution. But the problem with it is that it’s not universal and always requires to pass that customClassName for every swiper instance which is very inconvenient and counter intuitive so I would rather call it a hack rather than something that can be accepted as a proper fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use and customize Control Center on iPhone - Apple Support
On an iPhone with a Home button: Swipe up from the bottom. To close Control Center, swipe down or press the Home button....
Read more >
Windows 10 Touchscreen Tips for Surface and Tablet Users
Want to swipe between desktops? Want to swipe to hide the taskbar or change brightness? Check out my video for an awesome collection...
Read more >
Slick Carousel - Disable controls and interactions by external ...
What I want to achieve is to 'hold' or 'freeze' a slide disabling all kind of possible navigation (keyboard arrows, click and drag,...
Read more >
OpenLayers Examples
Example of a Layer swipe map. ... Example of measuring lengths and areas using vector styles. ... Example of a mouse position control,...
Read more >
Climate Controls - Tesla
By default, climate control is set to Auto, which maintains optimum comfort in ... whenever the climate control system is on and outside...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found