Velocity UI
Loading…
Menu

Getting Started

Velocity UI is a collection of re-usable components that you can copy and paste into your apps. It is not a component library you install as a dependency.

Quick Start

1. Run the initialization command to set up your project:

terminal
npx vui-registry-cli-v1 init

2. Add your first component (e.g., Button):

terminal
npx vui-registry-cli-v1 add button

Setup Theme

Velocity UI defaults to a refined light theme. Use next-themes to support both light and dark.

app/layout.tsx
import { ThemeProvider } from 'next-themes'

export default function RootLayout({ children }:{ children: React.ReactNode }){
  return (
    <html lang="en">
      <body>
        <ThemeProvider attribute="class" defaultTheme="light">
          {children}
        </ThemeProvider>
      </body>
    </html>
  )
}

Usage

After adding a component, you can import it directly from your components/ui folder:

app/page.tsx
import { Button } from '@/components/ui/button'

export default function Page(){
  return <Button>Hello World</Button>
}