Skip to content

Navs and tabs should look the same with <button> #32945

Closed

Description

@MickL

Elements like navs and tabs are mostly used with <a> in the docs. Anyhow modern JavaScript apps (e.g. using React or Angular) often do not use <a> elements to trigger internal ui events.

IMO It should be possible to use this elements CSS with buttons, too and they should look the same:

<ul class="nav">
  <li class="nav-item">
    <button class="nav-link active">Active</a>
  </li>
  <li class="nav-item">
    <button class="nav-link">Link</a>
  </li>
  <li class="nav-item">
    <button class="nav-link">Link</a>
  </li>
</ul>

Currently using components like .nav with buttons will totally break the layout.

This may affect the CSS only and must not apply to Bootstrap's Javascript.

Target version: 4.x / 5.x

Activity

  1. added
    featureNew feature, or a change to how an existing one works
    on Jan 31, 2021
  2. changed the title [-]Navs and tabs should look the same with buttons[/-] [+]Navs and tabs should look the same with <button>[/+] on Jan 31, 2021
  3. harshad71 commented on Feb 6, 2021

    @harshad71

    can you suggest me to work on it?

  4. ffoodd commented on Feb 8, 2021

    @ffoodd
    Contributor

    Hi there,

    FYI this in already in progress with #32630. At least this PR gets rid of border and background for buttons, which makes them look the same than links.

    @MickL If that doesn't match your request, feel free to elaborate a bit more and provide a reduced test case.

  5. added
    has-prAn open pull request addresses it
    on Feb 8, 2021
  6. linked a pull request that will close this issueDynamic tabs: use buttons rather than links #32630on Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature, or a change to how an existing one workshas-prAn open pull request addresses itv5v5, the v5-dev branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions