@andreyyolkin/keycloakify-vue
| Install | |
|---|---|
npm install @andreyyolkin/keycloakify-vue |
|
| Latest Version: | 0.2.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Sep 20, 2026 |
| Links: | GitHub · npm |
@andreyyolkin/keycloakify-vue
Vue 3 components for building Keycloak login themes with Keycloakify.
@andreyyolkin/keycloakify-vue is a community Vue 3 port of Keycloakify's UI layer, mirroring the architecture of
@keycloakify/svelte. It reuses Keycloakify's
framework-agnostic build tooling and core logic via a peer dependency — only the Vue UI layer (layer 3)
is reimplemented here. You write your Keycloak theme in Vue; keycloakify handles the build + jar
packaging unchanged.
Status
| Theme | Status |
|---|---|
| Login | Complete — all 38 login pages ported, including register.ftl / UserProfileFormFields |
| Account | Complete — all 7 classic account pages ported (account, password, sessions, totp, applications, log, federatedIdentity) |
| Admin/Email | Out of scope |
Installation
npm install --save-dev @andreyyolkin/keycloakify-vue
Peer dependencies: keycloakify ^11.15.1 and vue ^3.5.0 must be installed in your project.
The easiest way to get started is the official starter template:
- keycloakify-starter-vue — a ready-to-use
Vite + Vue project wired to
@andreyyolkin/keycloakify-vue, analogous tokeycloakify-starter-svelte.
What's Included
DefaultPage— top-level dispatcher component that routes all 38 loginpageIdvalues to the correct page component.Template— the outer page shell (header, info/error alerts, social providers, language switcher).- Per-page components — importable individually from
@andreyyolkin/keycloakify-vue/login/pages/*.vue(e.g.Login.vue,Register.vue,LoginOtp.vue, …). UserProfileFormFields— full dynamic user-profile form suite used byRegister,LoginUpdateProfile, andIdpReviewUserProfile.i18nBuilder— factory for wiring Keycloakify'snoJsxi18n engine into Vue (returnsmsg()/advancedMsg()that produce sanitizedVNodes).withCustomTranslationsmust be called from a plain.ts/.tsx/.jsfile, never from a.vueSFC. At build time,keycloakify'sgenerateMessagePropertiesstep statically scans your theme source for awithCustomTranslations({...})call to produce the server-sidemessages_<lang>.propertiesbundle — but it only scans files matching/\.(js|ts|tsx)$/, so a call placed inside a<script setup>block of a.vuefile is silently skipped and those keys never reach the server bundle (client-sidemsg()still works, which can make the gap easy to miss). Keep youri18nBuilder(...).withCustomTranslations(...)call in a dedicatedi18n.ts(as in this repo'sstories/login/i18n.ts) and import it from your.vuecomponents instead.- Account theme — importable from
@andreyyolkin/keycloakify-vue/account: its ownDefaultPage+Template, the 7 account pages at@andreyyolkin/keycloakify-vue/account/pages/*.vue, and an accounti18nBuilder. binhandlers —_keycloakify-custom-handlerdelegatesupdate-kc-gen,eject-page,add-story, andinitialize-account-themeso thekeycloakifyCLI treats your project as a Vue theme.
Usage
Clone or scaffold from the starter for the
full wiring. At its core a consumer project has a KcPage.vue that looks like:
<script setup lang="ts">
import { DefaultPage } from '@andreyyolkin/keycloakify-vue';
import type { KcContext } from './KcContext';
import { useI18n } from './i18n';
import Template from '@andreyyolkin/keycloakify-vue/login/Template.vue';
const props = defineProps<{ kcContext: KcContext }>();
const { i18n } = useI18n({ kcContext: props.kcContext });
</script>
<template>
<DefaultPage
:kcContext
:i18n
:Template
/>
</template>
How It Works / Relationship to Keycloakify
Keycloakify is built in three layers:
- Build tooling / CLI (
keycloakify/bin,keycloakify/vite-plugin) — framework-agnostic. Reads a built SPA, rewrites asset paths to FreeMarker variables, generates.ftltemplates, packages the theme.jar. - Core logic (
KcContexttypes,i18n/noJsx,getUserProfileApi,kcClsx,kcSanitize) — deliberately framework-agnostic. - UI components — the only framework-coupled layer.
@andreyyolkin/keycloakify-vue reuses layers 1 and 2 unchanged (via the keycloakify peer dependency) and
reimplements layer 3 in Vue 3.
Distribution: the package ships raw .vue single-file components plus .d.ts types. Your project's
Vite + @vitejs/plugin-vue compiles them — no pre-bundled JS is shipped.
Contributing
git clone https://github.com/AndreyYolkin/keycloakify-vue
git clone https://github.com/AndreyYolkin/keycloakify-starter-vue
cd keycloakify-vue
yarn install
yarn link-in-starter # links the built package into the starter
Changes to the library are reflected in the starter after yarn build (or yarn watch).
Issues and pull requests are welcome at github.com/AndreyYolkin/keycloakify-vue.
License
MIT
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.2.1 | ^3.5.0 | MIT | |
| 0.2.0 | ^3.5.0 | MIT | |
| 0.1.2 | ^3.5.0 | MIT | |
| 0.1.0 | ^3.5.0 | MIT |