diff --git a/README.md b/README.md index 9babccb..0d193c3 100644 --- a/README.md +++ b/README.md @@ -109,13 +109,13 @@ the [Hello World demo](https://github.com/patricknelson/svelte-retag/tree/main/d ### Options 🛠 -| Option | Default | Description | -|--------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `component` | _(required)_ | The constructor for your Svelte component (from `import`) | -| `tagname` | _(required)_ | The custom element tag name to use ([must contain a dash](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements)) | -| `attributes` | `[]` | `Array` (legacy): Explicit list of attributes to reactively forward to your component. Attributes must be the lowercase version of your Svelte component props ([similar to Lit](https://lit.dev/docs/components/properties/#observed-attributes)).

`Boolean` (recommended): If set to `true`, will automatically forward all attributes to your component props. If `false`, will not forward anything.

**Note:** In v2, this option will be removed and all attributes will be forwarded by default (for consistency with Svelte 4's custom elements). | -| `shadow` | `false` | Optional. Indicates if this component should use shadow DOM.

**Note:** Only basic support for shadow DOM is currently provided. See https://github.com/patricknelson/svelte-retag/issues/6. | -| `href` | `''` | Optional. URL to your stylesheet. Allows you to ensure your styles are included in the shadow DOM. This option is only useful when `shadow` is set to `true`. | +| Option | Default | Description | +|--------------|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `component` | _(required)_ | The constructor for your Svelte component (from `import`) | +| `tagname` | _(required)_ | The custom element tag name to use ([must contain a dash](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements)) | +| `attributes` | `[]` | `Array` (legacy): Explicit list of attributes to reactively forward to your component. Attributes must be the lowercase version of your Svelte component props ([similar to Lit](https://lit.dev/docs/components/properties/#observed-attributes)).

`Boolean` (recommended): If set to `true`, will automatically forward all attributes to your component props. If `false`, will not forward anything.

**Note:** In v2, this option will be removed and all attributes will be forwarded by default (for consistency with Svelte 4's custom elements, see https://github.com/patricknelson/svelte-retag/issues/36). | +| `shadow` | `false` | Optional. Indicates if this component should use shadow DOM.

**Note:** Only basic support for shadow DOM is currently provided. See https://github.com/patricknelson/svelte-retag/issues/6. | +| `href` | `''` | Optional. URL to your stylesheet. Allows you to ensure your styles are included in the shadow DOM. This option is only useful when `shadow` is set to `true`. | **Note:** For portability, `svelte-retag`'s API is fully backward compatible with [`svelte-tag@^1.0.0`](https://github.com/crisward/svelte-tag). @@ -152,6 +152,7 @@ Changes since forking from [`svelte-tag`](https://github.com/crisward/svelte-tag - Add demos to vercel site (see https://github.com/patricknelson/svelte-retag/issues/11) - Add step-by-step instructions and provided a simple MVP example (https://github.com/patricknelson/svelte-retag/pull/24) +- Automatically forward all attributes to component (i.e. `attributes: true`) (https://github.com/patricknelson/svelte-retag/issues/34) ### v2