Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 864 Bytes

30-naming.md

File metadata and controls

27 lines (19 loc) · 864 Bytes
layout title label permalink nav_order
page
Naming convention for Web-Components
Naming Conventions
/naming-components/
30

The name of the file will be the name of the component.

Example: components/x-button.html will create <x-button> component.

However in some cases you may want to give your component a different name than the file. To do so, you should give a name attribute in your <template> tag.

Example:

components/x-button.html:

<template name="my-super-button"></template>

Will make <my-super-button> component available.

Note that because it builds native web-components, the naming convention must respect the ones from the standards (lowercase, with a dash in the name, starting with a letter, …)