You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+27-2
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,33 @@ custom_elements/hello_element.js // will register <app-hello> automatically
49
49
50
50
Your `*_element.js` files have to `export default` custom elements for this to work properly.
51
51
52
-
> [!WARNING]
53
-
> Only single word elements are supported currently. See https://github.com/codergeek121/custom_elements-rails/issues/1
52
+
### Naming Convention for Custom Elements
53
+
54
+
When defining custom elements from files, their filenames are used to generate the element names automatically. The following rules and examples clarify how file paths are converted to custom element names:
55
+
56
+
#### Usage
57
+
58
+
Register all files in the `custom_elements` folder as custom elements using a prefix (e.g., `app`):
0 commit comments