Generated Computers
Locals: an Apple Silicon engine that runs local LLMs up to 3x faster. A product of Generated Computers.
Translation pending
Build Shopify apps with Vue 3. polaris-vue-elements gives you typed Vue components (props, events, v-model) around Shopify Polaris web components like s-button, s-text-field and s-modal, generated fro
Developer toolsTypeScript · JavaScriptGitHub @HQCuongOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Typed Vue 3 wrappers for Shopify Polaris web components (s-button, s-text-field, s-modal…) — props, events and v-model generated from the official Custom Elements Manifest.
Taken from the repository README
Loading the full README.
Read the full README ↗English | Tiếng Việt | 한국어 | 简体中文 | 日本語 | Deutsch | Français | Español
Documentation · Getting started · Components · Embedded app guide · Changelog
Typed Vue 3 wrapper components for Shopify Polaris web components: the s-* custom elements used to build Shopify App Home (embedded admin) apps.
The Polaris runtime itself loads from Shopify's CDN (the polaris-2.js stable channel receives compatible updates automatically). This library gives you an idiomatic, fully typed Vue surface on top of it.
@shopify/polaris-types): union-typed props like variant, autocomplete in templates, typed @click / @aftershow listeners.v-model on 17 form components (STextField, SCheckbox, SSelect, SChoiceList, …), each mapped to its correct property/event pair.SModal exposes a typed $el (ModalElement), so modal.value?.$el.showOverlay() type-checks, alongside Polaris's declarative commandFor / command pattern.$attrs, slots are forwarded verbatim, and brand-new Polaris components can always be used as raw s-* tags. A stale wrapper means missing types for new features, never broken existing ones.npm install polaris-vue-elements
Vue ^3.5 is a peer dependency.
The wrappers are presentational only. Your host app loads the Polaris runtime from Shopify's CDN and tells Vue that s-* tags are custom elements:
<!-- index.html -->
<script src="https://cdn.shopify.com/shopifycloud/polaris-2.js"></script>
// vite.config.ts
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('s-'),
},
},
})
Note:
polaris-2.jsis Shopify's stable channel and brings the admin's new visual design. Apps still onpolaris-1.jskeep working: 2.0's component API is the same as 1.1 apart from a few additions. See Polaris 2.0 and the new admin design.
<script setup lang="ts">
import { ref } from 'vue'
import { SButton, STextField } from 'polaris-vue-elements'
const name = ref('')
</script>
<template>
<STextField v-model="name" label="Name" />
<SButton variant="primary" @click="console.log(name)">Save</SButton>
</template>
Tip: prefer writing Polaris's own
<s-button>tags? Add"types": ["polaris-vue-elements/elements"]to yourtsconfig.json, and Volar /vue-tsctype-check raw<s-*>tags too (types only;v-modelstays wrapper-only). See Typing raw<s-*>tags.
Everything lives at polaris-vue-elements.dev:
v-model, overlays and typed raw tags.fetch, navigation and the save bar.The site's source is in docs/; run it locally with npm run docs:dev.
Everything derivable from Shopify's manifest is machine-generated; human judgment lives in one small file.
@shopify/polaris-types (custom-elements.json) ← source of truth
│ npm run generate
▼
src/lib/generated/ ← metadata, Props/Events/Element types, components (DO NOT EDIT)
src/lib/runtime/ ← createWrapper: one generic factory for all 62 components
src/lib/overrides.ts ← hand-written: v-model mappings only
Drift-guard tests make forgetting impossible: CI fails if generated code is stale, if a manifest component lacks a wrapper, or if a new form-like component is missing a v-model override. A scheduled workflow (sync-polaris.yml) opens a sync PR automatically when a new @shopify/polaris-types is published.
npm update @shopify/polaris-types
npm run generate # regenerate wrappers + types
npm run docs:generate # regenerate component reference docs
git diff # review, then note API changes in CHANGELOG.md
npm install
npm run dev # playground (src/App.vue) with live Polaris components
npm run docs:dev # documentation site
npm run test:unit # vitest (drift guards + wrapper behavior)
npm run type-check # vue-tsc
npm run lint # oxlint + eslint
npm run generate # regenerate src/lib/generated/ from the manifest
npm run docs:generate # regenerate docs/components/ from the manifest
npm run build:lib # build the publishable package into dist/
Bug reports, docs fixes and pull requests are welcome. See CONTRIBUTING.md for setup, ground rules and the pre-PR checklist, and the Code of Conduct. To report a vulnerability, see SECURITY.md.
Releases are cut from main by pushing a version tag. release.yml does the rest: checks, npm publish with provenance via npm Trusted Publishing, and a GitHub Release whose notes come from CHANGELOG.md.
CHANGELOG.md, move the ## [Unreleased] entries under a new ## [x.y.z] - YYYY-MM-DD heading and update the compare links at the bottom. The polaris-types sync PRs record new/removed components there automatically; add prop, slot and icon changes by hand (removals are breaking).npm version x.y.z --no-git-tag-version, commit both files, and push to main.git tag vx.y.z && git push origin vx.y.z. Tags with a pre-release suffix (e.g. v0.3.0-rc.0) publish under the next dist-tag.MIT. Not affiliated with or endorsed by Shopify.