Skip to content

Add option for collapse component to enable class toggling on toggle button when enabled/disabled #236

Description

@cjg89

Description

Because buttons and collapse components share the data-toggle attribute to enable their respective functionality via HTML, it is currently impossible to utilize .active class switching on a .btn that also controls a .collapse.

Add an opt-in option to the collapse component that lets the user specify one or more classes to add to the toggle, preferably on any of the toggle's four transition events:

  • show.bs.collapse
  • shown.bs.collapse
  • hide.bs.collapse
  • hidden.bs.collapse

Why it's Important

See scenario above.

Alternatives

n/a

Possible Implementation

Ideally these options should be configurable via HTML attributes and/or JS options.

Additional context

n/a

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions