swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.46k stars 8.95k forks source link

Add Scroll-to-Top Button Feature #10169

Open sanjaychethu opened 2 days ago

sanjaychethu commented 2 days ago

Description: A scroll-to-top button would greatly enhance user experience, especially for long web pages. This button should appear once the user scrolls down a certain distance and allow them to quickly return to the top of the page with a single click.

Feature Requirements:

Visibility:

The button should appear when the user scrolls down 20px or more from the top of the document. It should be hidden when the user is near the top of the page. Positioning:

The button should be positioned in the bottom-right corner of the viewport (fixed position). It should stay visible while scrolling. Design:

A simple round button with a label like "Top" or an arrow icon. Hover effect to change the button's color. Customizable appearance via CSS (background color, size, shadow, etc.). Functionality:

When clicked, the button should smoothly scroll the user to the top of the page. Compatibility with modern browsers (Chrome, Firefox, Safari, etc.). Accessibility:

The button should have a title/aria-label for screen readers (e.g., "Go to top").

Lansa-18 commented 2 days ago

@sanjaychethu Goodday, I would like to get this issue assigned to me, I'm a Frontend Developer looking to actively learn and contribute to OpenSource Projects.

adarshdeshp commented 2 days ago

Hi @sanjaychethu ,I'm really excited about this issue and I am interested to work on it. As a JavaScript and React developer, this is exactly the kind of issues I want to contribute. I'll start working on it right away, even though it hasn’t been officially assigned to me yet. I’ll submit a PR soon after solving. If there are any specific preferences or guidelines for the design and functionality, Please let me know.

Gitmuru commented 1 day ago

hi @sanjaychethu , would love to work on thiss..waiting for your reply to avoid premature PRs thankyou

rushikesh121 commented 16 hours ago

hii @sanjaychethu , I’d like to take on the scroll-to-top button feature. As a JavaScript and React developer, I have experience in implementing similar functionalities, and I can ensure a smooth and efficient solution. Please consider assigning this task to me, and I’ll get it done promptly.