Skip to content

Getting Started ​

VeloxUI is a high-performance Vue 3 component library with 60+ production-ready components, built-in theming, full tree-shaking, and TypeScript support out of the box.

Requirements ​

  • Vue ^3.4
  • Node.js >=18
  • A build tool that supports ES modules (Vite, Nuxt 3, Webpack 5+, Rspack, etc.)

Installation ​

Install the package with your favourite package manager:

bash
npm install veloxui
bash
pnpm add veloxui
bash
yarn add veloxui
bash
bun add veloxui

Full Import ​

The fastest way to get started — register every component and directive globally:

ts
import { createApp } from 'vue'
import VeloxUI from 'veloxui'
import 'veloxui/dist/style.css'
import App from './App.vue'

const app = createApp(App)
app.use(VeloxUI)
app.mount('#app')

This is convenient for prototyping, but ships the entire bundle. For production apps, prefer tree-shaking.

Import only what you actually use — component styles are bundled alongside each component and pulled in automatically:

ts
import { VxButton, VxInput, VxSelect } from 'veloxui'

No extra plugin, no babel transform, no config — modern bundlers (Vite, Rollup, Webpack 5) will strip unused components from your final build.

Basic Usage ​

vue
<script setup>
import { ref } from 'vue'
import { VxButton, VxInput } from 'veloxui'

const name = ref('')
</script>

<template>
  <VxInput v-model="name" placeholder="Your name" />
  <VxButton type="primary" @click="$emit('save')">Save</VxButton>
</template>

Every component is prefixed with Vx to avoid naming conflicts with your own components.

Global Configuration ​

Wrap your application with VxConfigProvider to set locale, default sizes, and shared options:

vue
<script setup>
import { VxConfigProvider } from 'veloxui'
import en from 'veloxui/locale/en'
</script>

<template>
  <VxConfigProvider :locale="en" size="medium">
    <RouterView />
  </VxConfigProvider>
</template>

See the Config Provider page for the full list of supported options and locales.

TypeScript ​

VeloxUI is written in TypeScript and ships with complete type definitions. No extra @types/* package is needed — you get prop, emit, slot, and method types automatically in your IDE.

ts
import type { VxButtonProps, VxTableColumn } from 'veloxui'

Nuxt 3 ​

Works out of the box — add it to nuxt.config.ts:

ts
export default defineNuxtConfig({
  modules: [],
  css: ['veloxui/dist/style.css'],
  build: {
    transpile: ['veloxui'],
  },
})

Then auto-import components or register them in a plugin.

SSR ​

All components are SSR-safe. Components that depend on window / document (Modal, Tooltip, Dropdown, etc.) hydrate on the client and do not leak DOM APIs to the server.

Theming ​

VeloxUI is fully themeable through CSS variables — no build step, no preprocessor, no JS API needed. Override any variable in a parent selector to retheme everything below it.

css
:root {
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --primary-hover: #1d4ed8;

  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --secondary-hover: #e2e8f0;

  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --destructive-hover: #b91c1c;

  --background: #ffffff;
  --foreground: #09090b;

  --accent: #f4f4f5;
  --accent-foreground: #18181b;

  --muted: #f4f4f5;
  --muted-foreground: #71717a;

  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #a1a1aa;

  --radius: 0.625rem;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

Dark Mode ​

Toggle dark mode by adding the .dark class to <html> (or any ancestor) and re-declaring the variables you want to change:

css
.dark {
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --primary-hover: #e4e4e7;

  --background: #09090b;
  --foreground: #fafafa;

  --border: rgba(255 255 255 / 0.1);
}

For a fully interactive theme playground with presets and a live preview, visit the Theming page.

All Variables ​

VariableDescription
--primaryPrimary button background
--primary-foregroundPrimary button text
--primary-hoverPrimary button hover
--secondarySecondary button background
--secondary-foregroundSecondary button text
--secondary-hoverSecondary button hover
--destructiveDestructive button background
--destructive-foregroundDestructive button text
--destructive-hoverDestructive button hover
--backgroundPage background
--foregroundDefault text color
--accentHover background for ghost/outline
--accent-foregroundHover text for ghost/outline
--mutedMuted background
--muted-foregroundMuted text
--borderBorder color
--inputInput border color
--ringFocus ring color
--radiusBase border radius
--shadow-xsExtra small shadow
--shadow-smSmall shadow

Component Prefix ​

All components use the Vx prefix to avoid naming conflicts:

ComponentName
ButtonVxButton
ButtonGroupVxButtonGroup
InputVxInput
BadgeVxBadge
SwitchVxSwitch
ModalVxModal

Browser Support ​

VeloxUI targets modern evergreen browsers with ES2020 support:

  • Chrome / Edge ≥ 90
  • Firefox ≥ 90
  • Safari ≥ 14

Legacy browsers (including IE) are not supported.

What's Next? ​