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

Let me set a custom color for rx.progress #3817

Closed
dentro-innovation opened this issue Aug 21, 2024 · 6 comments
Closed

Let me set a custom color for rx.progress #3817

dentro-innovation opened this issue Aug 21, 2024 · 6 comments
Assignees
Labels
feature request A feature you wanted added to reflex

Comments

@dentro-innovation
Copy link

https://reflex.dev/docs/library/datadisplay/progress/#api-reference

It's strange that the color of the loading bar can only be set via color_scheme, and there I can only choose the default radix themes.

I wanna use simply my own color, e.g. #FFF as the loading bar.

@Alek99 Alek99 added the feature request A feature you wanted added to reflex label Aug 21, 2024
@masenf
Copy link
Collaborator

masenf commented Aug 21, 2024

We used to have docs for this, but they appear to have been removed... https://github.com/reflex-dev/reflex-web/blob/masenf/changelog-0.4.9-and-friends/docs/library/datadisplay/progress-ll.md

Essentially you can set background to any valid css value and it should work

@dentro-innovation
Copy link
Author

dentro-innovation commented Aug 23, 2024

No background and background_color only set the color of the "unfilled" part on the right of the progress bar.

I want to set the color of the left part that is gradually filling.

Example:

rx.progress(
                                value=FileUploadState.progress,
                                # color_scheme="jade",
                                border=f"1px solid {rx.color('accent', 6)}",
                                background=rx.color("accent", 6),
                                background_color=rx.color("accent", 6),
                            ),

image

The accent color 6 is the right part of this progress bar, while the left filling part is the default accent color 9.
I can only change the color of the left filling part by specifying the color_scheme, such as commented out above. If I comment it in the color of the left part does change actually, but I'm limited to the default radix theme colors:

image

@wassafshahzad
Copy link
Contributor

Can I try this one ?

@picklelo
Copy link
Contributor

picklelo commented Sep 9, 2024

@wassafshahzad just assigned you!

@wassafshahzad
Copy link
Contributor

@picklelo This can be closed. I forgot to add the linked PR

@picklelo
Copy link
Contributor

Merged in #3926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature you wanted added to reflex
Projects
None yet
Development

No branches or pull requests

5 participants