--- type: ai-agent-documentation version: 2.0 component: TabSelector status: stable audience: ai-coding-agents-only human-readable: false category: navigation framework-support: - vanilla: true - react: true - vue: true - angular: true - svelte: true --- # Component: TabSelector DEFINITION: The TabSelector component provides accessible, keyboard-navigable tabbed interfaces to organize content. It relies on a specific HTML structure and is activated by a JavaScript class. ## Installation ```bash npm install @pm7/core ``` ### CSS & JavaScript Import REQUIRED: Import both the CSS and the main JavaScript file. ```javascript // ES modules import '@pm7/core/dist/pm7.css'; import '@pm7/core'; // Imports and initializes all components // HTML ``` ## Required Structure The component requires a container with `data-pm7-tab-selector`, a `.pm7-tab-list` for triggers, and corresponding `.pm7-tab-content` panels. The link between a trigger and a panel is made with `aria-controls` and `id`. ```html
Content for Panel 1
Content for Panel 2