bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

DRAFT: Provide a simple attribute toggling plugin

Open GeoSot opened this issue 3 years ago • 3 comments

Based on some internal discussions, this PR tries to provide a 'simple' plugin that can help toggle attributes or classes using html markup

Needs:

  • [ ] at least tests
  • [ ] feedback
  • [ ] maybe a better name

https://deploy-preview-35872--twbs-bootstrap.netlify.app/docs/5.1/components/toggler/

GeoSot avatar Feb 19 '22 20:02 GeoSot

My first question, why only click? Why not data-bs-toggle=click, data-bs-toggle=dblclick, data-bs-toggle=mousedown, data-bs-toggle=mouseenter,mouseleave (or an "alias" hover), etc.?

alecpl avatar Feb 20 '22 07:02 alecpl

My first question, why only click? Why not data-bs-toggle=click, data-bs-toggle=dblclick, data-bs-toggle=mousedown, data-bs-toggle=mouseenter,mouseleave (or an "alias" hover), etc.?

Many things to implement 😋 . Future plans and thoughts here: https://github.com/twbs/bootstrap/blob/1f0545bc938734ce918ba3b3ad42fb3622a103bf/js/src/dom/magic-actions.js

But have to pass one by one

GeoSot avatar Feb 22 '22 20:02 GeoSot

I think focusing on click is a good first step. Too many interactions could be a little messy IMO. Hover support might be interesting, but could also be tricky and can also be covered by CSS for a wide variety of situations. Would want to sit with it for a little bit I think.

mdo avatar Nov 11 '22 19:11 mdo