ketekny-ui-kit
v1.0.45
Published
A Vue 3 UI component library with Tailwind CSS styling
Maintainers
Readme
Ketekny UI Kit
Vue 3 UI component library styled with Tailwind CSS.
Installation
- Install the package:
npm install ketekny-ui-kit- Ensure required peer/runtime dependencies exist in your app:
npm install vue tailwindcss postcss autoprefixerIf your project already has Vue + Tailwind configured, you can skip step 2.
CI Publish Auth (NPM Token)
To publish from GitLab CI, create an npm granular token and store it in the runner/project CI variables.
1. Create npm token
- Open npm ->
Access Tokens->Generate New Token(Granular). - Set permissions to
Read and write. - Under package access, allow
ketekny-ui-kit. - Enable
Bypass two-factor authentication (2FA). - Create token and copy it (shown only once).
2. Save token in GitLab CI/CD variables
- Open GitLab project ->
Settings->CI/CD->Variables. - Add variable:
- Key:
NPM_TOKEN - Value:
<your npm token> - Type:
Variable - Masked:
true - Protected:
true(if publishing only from protected branches, e.g.main)
- Save and rerun pipeline.
3. Verify runner/tag
- Ensure the runner used by publish jobs has the required tag (currently
front). - Ensure the project can use that runner.
Tailwind Setup (Required)
Use the provided Tailwind preset so semantic colors and component color tokens are always available.
tailwind.config.js (ESM)
import tailwindPreset from "ketekny-ui-kit/tailwind-preset.js";
/** @type {import('tailwindcss').Config} */
export default {
presets: [tailwindPreset],
content: [
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
"./node_modules/ketekny-ui-kit/**/*.{vue,js,ts,jsx,tsx}",
],
};tailwind.config.cjs (CommonJS)
const tailwindPreset = require("ketekny-ui-kit/tailwind-preset.js").default;
/** @type {import('tailwindcss').Config} */
module.exports = {
presets: [tailwindPreset],
content: [
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
"./node_modules/ketekny-ui-kit/**/*.{vue,js,ts,jsx,tsx}",
],
};Notes:
- The preset contains the semantic color definitions and safelist patterns used by dynamic classes (alerts/toasts/button intents).
- If you replace
safelistin your own config, keep equivalent patterns or dynamic semantic classes may be purged.
App CSS Setup
Import the kit stylesheet in your app entry (main.js / main.ts):
import "ketekny-ui-kit/styles.css";Vue Setup
main.js / main.ts example:
import { createApp } from "vue";
import App from "./App.vue";
import "./style.css";
import {
kButton,
kInput,
kSelect,
kDateSelector,
kToggle,
toastPlugin,
confirmPlugin,
alertPlugin,
inputDialogPlugin,
tooltipPlugin,
} from "ketekny-ui-kit";
const app = createApp(App);
app.component("kButton", kButton);
app.component("kInput", kInput);
app.component("kSelect", kSelect);
app.component("kDateSelector", kDateSelector);
app.component("kToggle", kToggle);
app.use(toastPlugin);
app.use(confirmPlugin);
app.use(alertPlugin);
app.use(inputDialogPlugin);
app.use(tooltipPlugin);
app.mount("#app");Available Plugins
toastPluginadds$toast(success,error,warning,info,show)confirmPluginadds$confirm(options)alertPluginadds$alert.success|warning|error|info(...)inputDialogPluginadds$prompt(options)tooltipPluginregistersv-tooltip
Available Exports
Components
kMessagekButtonkChipkCodekDialogkDrawerkInputkDateSelectorkToolbarkSelectkTablekTabskTogglekUploaderkEditorkSpinnerkSelectButtonkDatatablekIconkMenukTagskSearchkArrayListkSkeletonkAppHeaderkAppFooterkAppMainkHero
Tailwind preset export
tailwindPreset
License
ISC
