plentico / pico

Svelte-like reactive UI compiler written in Go
2 stars 0 forks source link

Lowercase components #5

Open jimafisk opened 2 years ago

jimafisk commented 2 years ago

Svelte does not support components that begin with a lowecase letter:

This is intentional to denote a regular HTML element (starts with a lowercase letter) from a Svelte component (starts with an uppercase letter).

If Pico could support lowercase components and allow you to import a component with the same name as an HTML element to override it, that would help with the discoverable cms we're creating for Plenti. Essentially a developer should be able to build an app with standard elements like <h1>{title}</h1> and the CMS could inject a component to override the heading (e.g. import h1 from './ejected/cms/h1.pico';) to add things like .contentEditable or a bold/italic/underline widget.