@synergy-design-system/react
Version:
React wrappers for the Synergy Design System
40 lines (39 loc) • 2.42 kB
TypeScript
import Component from '@synergy-design-system/components/components/tab-group/tab-group.component.js';
import { type EventName } from '@lit/react';
import type { SynTabShowEvent } from '@synergy-design-system/components';
import type { SynTabHideEvent } from '@synergy-design-system/components';
/**
* @summary Tab groups organize content into a container that shows one section at a time.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-tab-group--docs
* @status stable
* @since 2.0
*
* @dependency syn-icon-button
*
* @slot - Used for grouping tab panels in the tab group. Must be `<syn-tab-panel>` elements.
* @slot nav - Used for grouping tabs in the tab group. Must be `<syn-tab>` elements.
*
* @event {{ name: String }} syn-tab-show - Emitted when a tab is shown. The payload of the event returns the "panel" attribute of the shown tab.
* @event {{ name: String }} syn-tab-hide - Emitted when a tab is hidden. The payload of the event returns the "panel" attribute of the hidden tab.
*
* @csspart base - The component's base wrapper.
* @csspart nav - The tab group's navigation container where tabs are slotted in.
* @csspart tabs - The container that wraps the tabs.
* @csspart active-tab-indicator - The line that highlights the currently selected tab.
* @csspart body - The tab group's body where tab panels are slotted in.
* @csspart scroll-button - The previous/next scroll buttons that show when tabs are scrollable, an `<syn-icon-button>`.
* @csspart scroll-button--start - The starting scroll button.
* @csspart scroll-button--end - The ending scroll button.
* @csspart scroll-button__base - The scroll button's exported `base` part.
*
* @cssproperty --indicator-color - The color of the active tab indicator.
* @cssproperty --indicator-width - The width of the active tab indicator.
* @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
* @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
*/
export declare const SynTabGroup: import("@lit/react").ReactWebComponent<Component, {
onSynTabShow: EventName<SynTabShowEvent>;
onSynTabHide: EventName<SynTabHideEvent>;
}>;
export type { SynTabShowEvent } from '@synergy-design-system/components';
export type { SynTabHideEvent } from '@synergy-design-system/components';