Tab Panel
<wa-tab-panel>
Tab panels are used inside tab groups to display tabbed content.
This component must be used as a child of <wa-tab-group>. Please see the Tab Group docs to see examples of this component in action.
Importing
Jump to heading
If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.
Import this component directly from the CDN:
import 'https://ka-f.webawesome.com/webawesome@0.14.0/components/tab-panel/tab-panel.js';
After installing Web Awesome via npm, import this component:
import '@awesome.me/webawesome/dist/components/tab-panel/tab-panel.js';
If you're self-hosting Web Awesome, import this component from your server:
import './webawesome/dist/components/tab-panel/tab-panel.js';
To import this component for React 18 or below, use the following code:
import WaTabPanel from '@awesome.me/webawesome/dist/react/tab-panel/index.js';
Slots
Jump to heading
Learn more about using slots.
| Name | Description |
|---|---|
| (default) | The tab panel's content. |
Attributes & Properties
Jump to heading
Learn more about attributes and properties.
| Name | Description | Reflects | |
|---|---|---|---|
activeactive |
When true, the tab panel will be shown.
Type
booleanDefault
false |
|
|
css |
One or more CSSResultGroup to include in the component's shadow root. Host styles are automatically prepended.
Type
CSSResultGroup | undefinedDefault
styles |
||
namename |
The tab panel's name.
Type
stringDefault
'' |
|
CSS custom properties
Jump to heading
Learn more about CSS custom properties.
| Name | Description |
|---|---|
--padding |
The tab panel's padding.
|
CSS parts
Jump to heading
Learn more about CSS parts.
| Name | Description | CSS selector |
|---|---|---|
base |
The component's base wrapper. |
::part(base)
|