Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation buttons for slider in vertical direction #3592

Closed
1 of 3 tasks
strarsis opened this issue May 23, 2020 · 11 comments · May be fixed by #7429
Closed
1 of 3 tasks

Navigation buttons for slider in vertical direction #3592

strarsis opened this issue May 23, 2020 · 11 comments · May be fixed by #7429
Labels

Comments

@strarsis
Copy link

strarsis commented May 23, 2020

This is a (multiple allowed):

  • bug
  • enhancement
  • feature-discussion (RFC)

SASS for having navigation buttons at the top and bottom
(and pointing up- and downwards) for a slider in vertical direction:

.swiper-container-vertical {
  .swiper-button-next,
  .swiper-button-prev {
    left: 50%;
    transform: rotate(90deg);
    transform-origin: left center;
  }

  .swiper-button-prev {
    top: 10px;
  }

  .swiper-button-next {
    top: auto;
    bottom: 10px;
  }
}

Hm, the transform rotation makes it a bit difficult to position. The arrows are slightly offset.

@JoshuaAlzate
Copy link

Any updates with this? Ideally when the direction is set to vertical, the navigation should place to up and down sides of the swiper. But it is not happening.

@strarsis
Copy link
Author

strarsis commented Oct 9, 2020

@Joshanity17: You can try the CSS I posted, it should place the arrows at the top and bottom and visually flip them in vertical directions.

@stale
Copy link

stale bot commented Apr 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 18, 2021
@stale
Copy link

stale bot commented Jun 18, 2021

This issue has been automatically closed due to inactivity. If this issue is still actual, please, create the new one.

@stale stale bot closed this as completed Jun 18, 2021
@strarsis
Copy link
Author

strarsis commented Apr 20, 2023

It appears that there are still no vertical-direction style navigation buttons, or am I missing a module or stylesheet?
Otherwise, it may be nice to re-open this issue.

New styles for Swiper v9 core (leveraging its CSS variables):

.swiper-vertical .swiper-button-next,
.swiper-vertical .swiper-button-prev {
	left: 50%;
	transform: rotate(90deg);
	transform-origin: left center;
}
.swiper-vertical .swiper-button-prev {
	top: calc(var(--swiper-navigation-size) / 2);
}
.swiper-vertical .swiper-button-next {
	top: auto;
	bottom: calc(var(--swiper-navigation-size) / 2);
}

Edit: According to this demo, there are no vertical style navigation buttons in v9.x yet.

Here a demo with the extra styles added

@DrMoshtael
Copy link

DrMoshtael commented Mar 29, 2024

This seems too obvious to be missing...?
This is a manual fix

@strarsis
Copy link
Author

@DrMoshtael: I agree, this should be added to swiper as default or extra styles (vertical module).

@DrMoshtael
Copy link

@DrMoshtael: I agree, this should be added to swiper as default or extra styles (vertical module).

Looks like you'll need to re-create this issue as it's gone stale

@strarsis
Copy link
Author

strarsis commented Mar 29, 2024

@DrMoshtael: I made a PR that references/(correctly) closes this issue: #7429

@DrMoshtael
Copy link

@DrMoshtael: I made a PR that references this issue: #7429

Awesome, thank you!

@strarsis
Copy link
Author

strarsis commented Aug 3, 2024

@nolimits4web: Could this be eventually revisited in the near future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants