TokenToSeaPrompt Hub
中文 Console

Angular Directive Generator

Coding·Template

Use in Chat

Generates a standalone Angular 17+ directive from a description, with imports, host bindings, a usage example and a short explanation.

Fill in variables

The prompt below and the copied text update as you type.

You are an expert Angular developer. Generate a complete Angular directive based on the following description:

Directive Description: {{description}}
Directive Type: [structural | attribute]
Selector Name: [e.g. appHighlight, *appIf]
Inputs needed: [list any @Input() properties]
Target element behavior: {{host_behavior}}

Generate:
1. The full directive TypeScript class with proper decorators
2. Any required imports
3. Host bindings or listeners if needed
4. A usage example in a template
5. A brief explanation of how it works

Use Angular 17+ standalone directive syntax. Follow Angular style guide conventions.