Skip to content

Commit 1e33ffc

Browse files
stanlp1stanlp1
andauthored
Update integration modes (#213)
* Update integration modes * upload gif to repo --------- Co-authored-by: stanlp1 <stanley.peng@constructor.io>
1 parent e7e8e5a commit 1e33ffc

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
- ♿ Accessible (a11y) – Built-in ARIA support for screen readers
2929
- 🛡 Written in TypeScript with type safety
3030

31-
## ⚡ Installation & Quick Start
31+
32+
## React
33+
34+
### ⚡ Installation & Quick Start
3235
Install the library
3336

3437
```sh
@@ -47,11 +50,47 @@ function YourComponent() {
4750
<CioAutocomplete
4851
apiKey="key_M57QS8SMPdLdLx4x"
4952
onSubmit={(e) => {console.log(e)}}
50-
/>
5153
</div>
5254
);
5355
```
5456
57+
## Shopify
58+
59+
### ⚡ Installation & Quick Start
60+
61+
The Constructor autocomplete component is available as part of the [Constructor.io Shopify App](https://apps.shopify.com/constructor-connect)
62+
63+
After installing the app, you can use the Constructor autocomplete component by clicking 'Add Section' in your theme editor and adding the Constructor autocomplete liquid component
64+
65+
![installation gif](./assets/autocomplete-ui-liquid-shopify-demo.gif)
66+
67+
For more in depth instructions, check out the [Shopify documentation](https://docs.constructor.com/docs/integrating-with-constructor-platform-connectors-frontend-connectors-shopify-ui).
68+
69+
## Bundle (Vanilla JS)
70+
This is a framework agnostic method that can be used in any JavaScript project. The CioAutocomplete function provides a simple interface to inject an entire Autocomplete UI into the provided selector. In addition to Autocomplete component props, this function also accepts a selector and includeCSS.
71+
72+
### ⚡ Installation & Quick Start
73+
74+
Install the library
75+
76+
```sh
77+
npm i @constructor-io/constructorio-ui-autocomplete
78+
```
79+
80+
Import and use the `CioAutocomplete` component
81+
```javascript
82+
import CioAutocomplete from '@constructor-io/constructorio-ui-autocomplete/constructorio-ui-autocomplete-bundled';
83+
84+
CioAutocomplete({
85+
selector: '#autocomplete-container',
86+
includeCSS: true, // Include the default CSS styles. Defaults to true.
87+
apiKey: 'key_M57QS8SMPdLdLx4x',
88+
onSubmit: (submitEvent) => console.dir(submitEvent),
89+
// ... additional arguments
90+
});
91+
</script>
92+
```
93+
5594
## 💡 Code Examples
5695
5796
Ready-to-use, copy-paste examples with explanations.
8.15 MB
Loading

0 commit comments

Comments
 (0)