# chatty-tab-panel

API chuẩn của element chatty-tab-panel, sinh từ custom-elements.json của prototype trong guide.

## Key rules

- `chatty-tab-panel` khai báo 0 attribute, 0 property không có attribute, 0 event, 1 slot, 1 part và 0 CSS custom property.
- Import 1 module `@avada/chatty-ui/elements/tab-panel.js` là define `chatty-tab-panel`; chunk chỉ import element nó dùng. Prototype chuẩn:  trong guide.
- Đổi tên attribute, event, slot, part hay CSS custom property là đổi API: diff của custom-elements.json phải có trong 1 MR.

## Overview

The panel of the chatty-tab at the same position in a chatty-tabs. The parent sets aria-labelledby and hides every panel but the selected one. Class `ChattyTabPanel`.

### Attributes

Not declared in the manifest.

### Properties

Not declared in the manifest.

### Events

Not declared in the manifest.

### Slots

| Name | Description |
| --- | --- |
| default | Panel content. |

### Parts

| Name | Description |
| --- | --- |
| `base` | Panel box. |

### CSS custom properties

Not declared in the manifest.

## Live preview

Component thật dùng cùng story với trang component; dữ liệu mẫu nằm trong frame cục bộ.

Example (Standard) — Default: ví dụ giữ context cha cần thiết từ story có sẵn.

```html
<chatty-tabs label="Knowledge file tools" style="width: 100%">
  <chatty-tab>Test</chatty-tab>
  <chatty-tab>Problems</chatty-tab>
  <chatty-tab>Outline</chatty-tab>
  <chatty-tab-panel>Ask a question to test this file.</chatty-tab-panel>
  <chatty-tab-panel>No problems found.</chatty-tab-panel>
  <chatty-tab-panel>Headings of the file.</chatty-tab-panel>
</chatty-tabs>
```

Example (Standard) — Các variant hoặc state chính đặt cạnh nhau trong cùng ví dụ.

```html
<chatty-tabs segmented activation="manual" selected-index="1" label="Order view" style="width: 100%">
  <chatty-tab>Details</chatty-tab>
  <chatty-tab>Tracking</chatty-tab>
  <chatty-tab disabled>Returns</chatty-tab>
  <chatty-tab-panel>Items and totals.</chatty-tab-panel>
  <chatty-tab-panel>In transit, arriving Friday.</chatty-tab-panel>
  <chatty-tab-panel>No returns.</chatty-tab-panel>
</chatty-tabs>
```

## Anatomy

Số trong hình khớp bảng bên dưới. Phần chỉ hiện ở state khác được ghi Not shown; ví dụ không thêm phần tử giả.

Example (Standard) — Anatomy: một instance mặc định riêng, có khoảng trống quanh các phần được đánh số.

```html
<chatty-tabs label="Knowledge file tools" style="width: 100%">
  <chatty-tab>Test</chatty-tab>
  <chatty-tab>Problems</chatty-tab>
  <chatty-tab>Outline</chatty-tab>
  <chatty-tab-panel>Ask a question to test this file.</chatty-tab-panel>
  <chatty-tab-panel>No problems found.</chatty-tab-panel>
  <chatty-tab-panel>Headings of the file.</chatty-tab-panel>
</chatty-tabs>
```

| Part | Element | Source |
| --- | --- | --- |
| 1 | CSS part `base` | chatty-ui/custom-elements.json |

## Keyboard

No element-specific keys.

### Source

- chatty-ui/custom-elements.json
