Skip to main content

Introduction

The tabs Blade component provides styled navigation links or buttons. It does not implement the keyboard behavior or content panels of an accessible tabset. For switching between schema content panels, use the schema tabs component.

Triggering the active state of the tab

By default, tabs do not appear “active”. To make a tab appear active, you can use the active attribute:
You can also use the active attribute to make a tab appear active conditionally:
Or you can use the alpine-active attribute to make a tab appear active conditionally using Alpine.js:

Setting a tab icon

Tabs may have an icon, which you can set using the icon attribute:

Setting the tab icon position

The icon of the tab may be positioned before or after the label using the icon-position attribute:

Setting a tab badge

Tabs may have a badge, which you can set using the badge slot:
By default, a tab’s underlying HTML tag is <button>. You can change it to be an <a> tag by using the tag attribute:
Do not add tablist or tabpanel roles to these navigation links.

Using vertical tabs

You can render the tabs vertically by using the vertical attribute: