Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Vue 3 Creating Single File Components (SFC)

Vue 3 Creating Single File Components (SFC)

Vue's Single File Component (i.e., the *.vue file, Single-File Component, abbreviated SFC) is a special file format that lets us encapsulate a Vue component's template, logic, and styles in a single file.

In Vue 3, you can use .vue files to create Single File Components (SFCs); this file contains the component's template, JavaScript code, and CSS styles.

Now we will delete all content in the example project created via the npm init vue@latest command (refer to Vue 3 Installation) so that you can create your own simple web page in Vue.

Before we start writing code, delete