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

Allow toggling classes #4019

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Allow toggling classes #4019

merged 1 commit into from
Nov 21, 2024

Conversation

falkoschindler
Copy link
Contributor

Inspired by feature request #4013, this PR adds the ability to toggle classes (and default classes) like this:

label = ui.label('Hello')
ui.button('Toggle', on_click=lambda: label.classes(toggle='bg-red-500'))

@falkoschindler falkoschindler added the enhancement New feature or request label Nov 21, 2024
@falkoschindler falkoschindler added this to the 2.6 milestone Nov 21, 2024
@rodja rodja merged commit 1f6e3fb into main Nov 21, 2024
8 checks passed
@rodja rodja deleted the toggle-classes branch November 21, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants