kopia lustrzana https://github.com/shoelace-style/shoelace
1.5 KiB
1.5 KiB
Tab Panel
[component-header:sl-tab-panel]
<sl-tab-group>
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="custom">Custom</sl-tab>
<sl-tab slot="nav" panel="advanced">Advanced</sl-tab>
<sl-tab slot="nav" panel="disabled" disabled>Disabled</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="custom">This is the custom tab panel.</sl-tab-panel>
<sl-tab-panel name="advanced">This is the advanced tab panel.</sl-tab-panel>
<sl-tab-panel name="disabled">This is a disabled tab panel.</sl-tab-panel>
</sl-tab-group>
import { SlTab, SlTabGroup, SlTabPanel } from '@shoelace-style/shoelace/dist/react';
const App = () => (
<SlTabGroup>
<SlTab slot="nav" panel="general">
General
</SlTab>
<SlTab slot="nav" panel="custom">
Custom
</SlTab>
<SlTab slot="nav" panel="advanced">
Advanced
</SlTab>
<SlTab slot="nav" panel="disabled" disabled>
Disabled
</SlTab>
<SlTabPanel name="general">This is the general tab panel.</SlTabPanel>
<SlTabPanel name="custom">This is the custom tab panel.</SlTabPanel>
<SlTabPanel name="advanced">This is the advanced tab panel.</SlTabPanel>
<SlTabPanel name="disabled">This is a disabled tab panel.</SlTabPanel>
</SlTabGroup>
);
?> Additional demonstrations can be found in the tab group examples.
[component-metadata:sl-tab-panel]