-
alpinejs is (one of many) natural friends of django-cotton alpinejs supports conditional bindings such as:
The above is a dynamic "approve" button that on first tap changes to an "Are you sure?" button, and on 2nd tap submits the form. To set a dynamic class in alpinejs, you use This is a low priority, but it would be nice if there was somehow support for this. It may not be possible with the syntax of variable binding within django-cotton, and I prefer it as-is if so. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is on the list, I think we can allow a double colon
|
Beta Was this translation helpful? Give feedback.
-
Released in 1.5.0 More here: https://django-cotton.com/docs/components#alpine-js-support |
Beta Was this translation helpful? Give feedback.
Released in 1.5.0
More here: https://django-cotton.com/docs/components#alpine-js-support