Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Generate Component From TemplateNew to Visual Studio Code? Get it now.
Generate Component From Template

Generate Component From Template

Thiago Cordeiro

|
476 installs
| (2) | Free
A visual studio code extension for you to generate the any components from predefined templates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Generate Components from Templates 🚀

A visual studio code extension for you to generate the any components from template files.

Logo

First steps:

  1. Create a folder named .components-templates in your application's root directory.

  2. Create your files with the extension .tmpl in the folder .components-templates with a tag {component_name} to be replaced with the chosen name of your component, for example:

import React from "react";

export default function {component_name}(){
  return <h2>{component_name}</span>;
}

Usage

Demo

Extension Settings

This extension contributes the following settings:

  • generate-component-from-template.path-file-templates: Path where your template files are located. Tip: Place at the root of the project.

  • generate-component-from-template.component-name: Variable that will be used to name your competent and their respective files. Tip: Use between braces.

  • generate-component-from-template.files-extension: Extension of the generated files.

  • generate-component-from-template.generate-index-export: If true, it will generate an index file for standard component export.

Contributors


Lorena Kauane


Thiago Cordeiro

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft