Installation

Two steps. There is no third.

1. Install

terminal
npm install @the_viveksingh/vivek-ui

React 18 or 19 is a peer dependency. Nothing else is installed, because the package has no runtime dependencies of its own. Confirm it yourself with npm ls --omit=dev @the_viveksingh/vivek-ui.

2. Import the stylesheet once

app/layout.tsx
import '@the_viveksingh/vivek-ui/styles.css'

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

Only the CSS you use

One stylesheet is the simple answer and the right default. If you would rather ship less, every component also has its own file: a page built from Button, Card, Input, Navbar and Hero needs about 4 kB of CSS gzipped instead of 34.

// Instead of the whole stylesheet…
import '@the_viveksingh/vivek-ui/css/reset.css'
import '@the_viveksingh/vivek-ui/css/tokens.css'
import '@the_viveksingh/vivek-ui/css/button.css'
import '@the_viveksingh/vivek-ui/css/card.css'
import '@the_viveksingh/vivek-ui/css/input.css'

reset.css and tokens.css are the two everything else assumes; the rest are named after the component directory. A few components borrow another's look — Combobox uses the Input styles, DatePicker uses Calendar's — and say so on their own page. The JavaScript needs no equivalent: it already tree-shakes, so a Button import costs 780 B.

Using charts

Charts are a separate subpath with their own stylesheet, so an app that never draws one pays nothing for them.

import { LineChart } from '@the_viveksingh/vivek-ui/charts'
import '@the_viveksingh/vivek-ui/charts.css'

Compound components in Server Components

// In a Server Component
import { Tabs, TabsList, TabsTab } from '@the_viveksingh/vivek-ui'

// In a client component, either works
import { Tabs } from '@the_viveksingh/vivek-ui'
<Tabs.List>...</Tabs.List>

What it runs on

Stated, and tested rather than assumed. The browser suite runs every route and every demo in Chromium at three viewports, in Firefox and in WebKit on each change; the CSS build targets exactly the list below, so a prefix Safari still needs is emitted rather than hoped for.

RequirementSupported
React18 and 19 (peer range ^18 || ^19), tested on both
Next.jsApp Router and Pages Router; 65 of the components are Server Components
Node18 and above, tested on 18 and 20 against the built package
BrowsersThe last two versions of Chrome, Edge and Firefox; Safari and iOS Safari from16.4
Package managersnpm, yarn and pnpm, each installed from a real tarball in CI

Older browsers are not blocked, they are simply not tested: the library uses:where(), container queries, color-mix() and logical properties, all of which need a 2023-or-later engine.

That is the whole setup

No config file, no CLI, no Tailwind, no PostCSS plugin, no Babel plugin, and no required provider. If you needed a third step, that would be a bug in the library's design.