Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

13 Commits

Repository files navigation

Development

Setup

To initialize this component for all supported browsers, you must add scripts to the head of the document that point to their URL location.

Initialization HTML

<!-- OPTIONAL: preloaded dependency for a performance boost --><linkrel="preload" crossoriginhref="utils.mjs" crossoriginas="script"/><!-- REQUIRED: main module for modern Evergreen browsers (Safari, Edge, Chrome, Mobile Safari, and Firefox) --><scriptcrossorigintype="module" src="https://somecdn.com/@livecomponents/panel-set/master/panel-set.mjs"></script><!-- OPTIONAL: fallback module if BASIC STYLING and MINIMAL FUNCTIONAL SUPPORT for older browsers --><scriptcrossoriginnomoduletype="text/javascript" src="https://somecdn.com/livecomponents/panel-set/master/panel-set.js"></script>

HTML Content (for SEO)*

This is the HTML required to be on page before Google/Bing can scan the page for their indexing algorithms. This is usually achieved via 'prerendering' or 'server side rendering (SSR)'. None of the JavaScript or CSS for the <panel-set /> is necessary for the page to be indexed. No content is required by default to be indexed by search engines but here is an HTML example of how you can add content that will be indexed.

<panel-setactive-index="0"><ahref="" slot="ps:tab-1">panel title </a><divslot="ps:panel-1">
panel content
</div></panel-set>

Theming

Set these values to get different themes.

Custom Properties

Variable NameDefault Value
--ps--border-color#bcbcbc
--ps--tab-border-colorrgba(255, 255, 255, 0)
--ps--tab-border-color--activergba(255, 255, 255, 1)
--ps--tab-text-colorinherit

Shadow Parts (*)

Part NameSummary
ps-summary
ps-details
ps-tabs
ps-panels

(*) Not Supported in Webkit based browsers

Attributes

none

Slots

namesummarytypeSEO Requirement
ps:tab-*These are the panel tab linksdynamic
ps:panel-*These are panel tab content areasdynamic
() can be multiple elements - each incremented by an integer starting with 1*

Custom Event Hooks

namedetail datasummary
ps:change`{ activeIndex: numbernull, activeTab: DOMNode

Dependencies

npne

Customization

Hiding Slots

There might be times where you want to hide a slot but remove the default value. To do this you must add the slot as normal but add an additional 'hidden' attribute to it.

<panel-set><!-- other slots can go here ... --><ahref="" hiddenslot="ps:tab-1">First Item Title</a></panel-set>

Current SEO Requirements

none

Base CSS

Please note that some CSS is injected to the head of the document on initialization of this codebase (ONLY once). This is done to insure that some styling for slots does not get broken by any CSS reset the application.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages