2023-06-06 12:22:18 +00:00
|
|
|
---
|
|
|
|
meta:
|
|
|
|
title: Tab
|
|
|
|
description: Tabs are used inside tab groups to represent and activate tab panels.
|
|
|
|
layout: component
|
|
|
|
---
|
|
|
|
|
|
|
|
```html:preview
|
|
|
|
<sl-tab>Tab</sl-tab>
|
|
|
|
<sl-tab active>Active</sl-tab>
|
|
|
|
<sl-tab closable>Closable</sl-tab>
|
|
|
|
<sl-tab disabled>Disabled</sl-tab>
|
|
|
|
```
|
|
|
|
|
|
|
|
```jsx:react
|
2023-08-11 17:09:44 +00:00
|
|
|
import SlTab from '@shoelace-style/shoelace/dist/react/tab';
|
2023-06-06 12:22:18 +00:00
|
|
|
|
|
|
|
const App = () => (
|
|
|
|
<>
|
|
|
|
<SlTab>Tab</SlTab>
|
|
|
|
<SlTab active>Active</SlTab>
|
|
|
|
<SlTab closable>Closable</SlTab>
|
|
|
|
<SlTab disabled>Disabled</SlTab>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
:::tip
|
|
|
|
Additional demonstrations can be found in the [tab group examples](/components/tab-group).
|
|
|
|
:::
|