shoelace-style / shoelace

A collection of professionally designed, every day UI components built on Web standards. SHOELACE IS BECOMING WEB AWESOME 👇👇👇
https://webawesome.com
MIT License
12.98k stars 837 forks source link

create out of the box support for svelte #1010

Closed bmbshlly closed 2 years ago

bmbshlly commented 2 years ago

Can you create a package for svelte, like we have for react using reactify-wc?

claviska commented 2 years ago

Svelte works with web components out of the box, so there’s no need to wrap them.

I’m going to close this, but if there’s something I’m missing feel free to comment and I’ll reopen as necessary.

nileshtrivedi commented 9 months ago

It would be helpful to have docs/instructions for adding and using Shoelace correctly in Svelte and SvelteKit apps.

esaramago commented 3 weeks ago

Svelte doesn't like custom inputs:

image

SOLUTION:

Similiar to Vue solution (https://shoelace.style/frameworks/vue#two-way-binding):

  <sl-input
    id="email"
    label="Email"
    value={email}
    oninput={event => email = event.target.value}
  ></sl-input>
claviska commented 3 weeks ago

Svelte doesn't like custom inputs

I would suggest opening an issue encouraging the Svelte maintainers to add support, as custom element form controls are becoming more and more common.