# `m-tab`

Tabs are a navigation component that allows users to switch between different sections within the same context. They help organize content efficiently by displaying only one section at a time, reducing clutter and improving accessibility. Tabs can include icons, labels, and notification badges to provide additional context. They are commonly used in dashboards, product management, and settings interfaces.

## Props

| Name | Description | Type | Default |
|------|-------------|------|---------|
| `tag` | The HTML tag used for the tab. | `'a'` `'button'` | `button` |
| `selected` | If `true`, the tab will be selected. | `boolean` | `false` |
| `href` | URL for the tab link. | `string` |   |
| `disabled` | If `true`, the tab will be disabled. | `boolean` |   |
| `badge` | The number badge displayed for the tab. | `number` |   |

## Slots

| Name | Description |
|------|-------------|
| `icon` | Use this slot to insert an icon for the tab. |
| `default` | The content displayed in the tab. |

## Dependencies

### Depends on

- [m-number-badge](../numberbadge/README.md)

### Graph

```mermaid
graph TD;
  m-tab --> m-number-badge
style m-tab fill:#008240,stroke:#333,stroke-width:4px
```

