This is the Vue transpiled implementation of the Atomium design system to be used in Vue projects.
The Vue wrappers are automatically generated by Stencil using the @stencil/vue-output-target, providing a seamless integration between Web Components and Vue with proper TypeScript support, event handling, and v-model binding.
npm i @juntossomosmais/atomiumNote: The @stencil/vue-output-target runtime is automatically installed as a dependency. You don't need to install it explicitly.
<template>
<AtomButton>Click me</AtomButton>
</template>
<script setup>
import '@juntossomosmais/atomium/core.css'
import { AtomButton } from '@juntossomosmais/atomium/vue'
</script>Components self-register their custom elements on import. No plugin installation or loader setup is required.
Stencil events (atomChange, atomClick, ...) are re-emitted as Vue component events, so the usual kebab-case template syntax works on the wrappers:
<AtomAlert action-text="Undo" @atom-action="handleAction" />Form components (AtomInput, AtomTextarea, AtomSelect, AtomDatetime) support v-model, bound to the value prop and updated on atomChange:
<template>
<AtomInput label="Name" v-model="name" />
</template>
<script setup>
import { ref } from 'vue'
import { AtomInput } from '@juntossomosmais/atomium/vue'
const name = ref('')
</script>All Atomium custom components (prefixed with atom-) are available as Vue wrappers. Ionic components are imported globally and can be used directly from @ionic/core if needed.
You could check the Vue components transpiled of Stencil in Vue Stories
The loader-based ComponentLibrary plugin was removed. Previously it registered all components lazily and converted camelCase custom events to kebab-case for raw custom-element tags.
- Wrapper users: remove the
ComponentLibrary.install()call (and its import). Nothing else changes — kebab-case event bindings on wrapper components keep working. - Raw
<atom-*>tag users: migrate to the Vue wrappers (recommended), or keep raw tags and listen to the camelCase DOM events (@atomChangeviav-on:atomChange, oraddEventListener('atomChange', ...)), since the kebab-case event conversion no longer exists.
For more details about the architecture decisions, see: