Skip to main content
Glama

extend_component

Generate a properly subclassed TypeScript component extending an existing web component, with correct inheritance, annotations, and style encapsulation warnings.

Instructions

Generates a properly subclassed TypeScript component extending an existing web component. Produces the correct inheritance chain (class NewClass extends ParentClass), CEM @customElement annotation, CSS part forwarding guidance (exportparts), inherited slot documentation, TypeScript HTMLElementTagNameMap declaration, and Shadow DOM style encapsulation warnings. Prevents common extension anti-patterns such as broken inheritance chains, missing exportparts declarations, and style isolation surprises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryIdNoOptional library ID to target a specific loaded library instead of the default.
parentTagNameYesTag name of the existing parent component to extend (e.g. "hx-button").
newTagNameYesTag name for the new subclass component (e.g. "my-custom-button"). Must contain a hyphen.
newClassNameNoOptional explicit class name for the new subclass. Defaults to PascalCase derived from newTagName (e.g. "MyCustomButton").

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bookedsolidtech/helixir'

If you have feedback or need assistance with the MCP directory API, please join our Discord server