Skip to main content Sidebar
On this page
Skip to table of contents

Tab

<pc-tab> 0.1.0 experimental

Tabs are used inside tab groups to represent and activate tab panels.

Additional demonstrations can be found in the tab group demos.

Properties

NameDescriptionReflectsDefault
panelThe name of the tab panel this tab is associated with. The panel must be located in the same tab group.
Type: string
""
activeMakes the tab active.
Type: boolean
false
closableMakes the tab closable and adds a close button.
Type: boolean
false
disabledDisables the tab.
Type: boolean
false
updateComplete A read‐only promise that resolves when the component has finished updating.

Learn more about customising animations.

Slots

NameDescription
(default)The tab’s label.

Learn more about using slots.

Events

NameDescriptionEvent detail
pc-closeEmitted when the tab is closable and the close button is pressed.

Learn more about events.

Parts

NameDescription
baseThe component’s base wrapper.
close-buttonThe close button, a <pc-icon-button>.
close-button-baseThe close button’s base part.

Learn more about customising CSS parts.

Importing

If you’re using the autoloader or the standard loader, you can skip this section. But if you’re cherry picking, you can use any of the following snippets to import this component.

CDN (script tag)CDN (import)npm (import)

To manually import this component from the CDN, copy this code snippet and paste it in your HTML.

<script type="module" src="https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.3/cdn/components/tab/tab.js"></script>

To manually import this component from the CDN, copy this code snippet and paste it in your JavaScript file.

import "https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.3/cdn/components/tab/tab.js";

To manually import this component from npm, copy this code snippet and paste it in your JavaScript file.

import "placer-toolkit/dist/components/tab/tab.js";

Dependencies

This component automatically imports these components:

We’d love to hear from you. Please reach out to us with any questions or enquiries you may have.

You can contact us via e‐mail at placer.coc.reports+contact@gmail.com.

We look forward to hearing from you!

Got it!
Dangerous lands

Whoa! You’ve wandered into the dangerous lands of Placer Toolkit. Version 0 is out of date and doesn’t meet EU privacy standards, including GDPR.

Want the latest powers, security and compliance? Stick with the current version of Placer Toolkit!

Yikes! Power up!

Our site is 100 % cookie‐free! We value your privacy, which is why we don’t store any cookies or personal information related to you.

Your browser history is safe from crumbs, and your data is protected, aligning with modern privacy standards like the GDPR. Enjoy your visit without a single digital cookie in sight! 🍪🚫

View our Privacy Policy for more information.

Got it!