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

[Button] Loading spinner #10635

Open
1 task
khoinpb96 opened this issue Jan 23, 2025 · 4 comments
Open
1 task

[Button] Loading spinner #10635

khoinpb96 opened this issue Jan 23, 2025 · 4 comments

Comments

@khoinpb96
Copy link

Is your feature request related to a problem?

Yes, the lack of a built-in loading spinner for buttons makes it difficult to handle loading states in a consistent and efficient way. Developers often resort to custom implementations or third-party libraries, which can lead to design inconsistencies and increased maintenance.

Describe the solution you'd like

I propose adding a loading spinner feature to the Button component. This would allow developers to easily indicate loading states, such as during form submissions or async operations.

For inspiration, consider how Ant Design implement this feature.

Example usage:

<Button loading>Submit</Button>

This addition would streamline the implementation of loading states in buttons and improve the overall developer experience.

Describe alternatives you've considered

No response

Additional Context

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@MarcusNotheis
Copy link
Collaborator

Thanks for submitting this feature request.
You can wrap the Button (and every other component) in the Busy Indicator component to achieve the desired behaviour:

<BusyIndicator active={true|false}>
  <Button>Submit</Button>
</BusyIndicator>

Anyhow, as this component is developed by our UI5 Web Components colleagues, I'll forward this request to their repository.

@Lukas742 Lukas742 transferred this issue from SAP/ui5-webcomponents-react Jan 23, 2025
@nnaydenow
Copy link
Contributor

Hi,

As Marcus mentioned, this can be achieved by wrapping the button inside a <ui5-busy-indicator>.

However, this functionality is not part of the current component specification and seems to be a new feature request. I’ll forward this issue to the team responsible for maintaining the component.

Best regards,
Nayden

@DMihaylova
Copy link

Hi @khoinpb96,

My team is the owner of ui5-button. I am wondering whether the proposed solution with the wrapped button inside a busy indicator would suit your needs or the request is still valid?

Thanks & Regards,
Diana

@khoinpb96
Copy link
Author

Hi @DMihaylova,

I believe the request is still valid, since the BusyIndicator (imo) should only be used on larger size components, not for buttons.

Thank you for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants