Getting Started
Welcome to the NayaOne Design System
This guide will help you install dependencies, connect the UI libraries, and start using components in your projects.
📦 Installation
Section titled “📦 Installation”Configure the Package Manager
Section titled “Configure the Package Manager”Add NayaOne’s private registry to your package manager with your personal access token.
export NPM_TOKEN=<your-npm-token>echo //gitlab.com/api/v4/packages/npm/:_authToken=${NPM_TOKEN} > .npmrcDon’t have one? Generate a new personal access token
Install the Package
Section titled “Install the Package”Using Bun
Section titled “Using Bun”bun install @fintech-sandpit/uiUsing npm
Section titled “Using npm”npm install @fintech-sandpit/uiInstall TailwindCSS
Section titled “Install TailwindCSS”Using Bun
Section titled “Using Bun”bun install tailwindcssUsing npm
Section titled “Using npm”npm install tailwindcssSetup Vite
Section titled “Setup Vite”In case of using Vite, add its plugin for TailwindCSS and a configuration file.
Using Bun
Section titled “Using Bun”bun install @tailwindcss/viteUsing npm
Section titled “Using npm”npm install @tailwindcss/viteCreate the configuration file
Section titled “Create the configuration file”tailwind.config.ts
import type { Config } from 'tailwindcss';
const config: Config = { darkMode: ['selector', '&:where([data-theme="dark"] *)'], content: ['./src/**/*.{js,jsx,ts,tsx,vue}'],};
export default config;Setup Vite for React app
Section titled “Setup Vite for React app”vite.config.ts
import { defineConfig } from 'vite'import tailwindcss from '@tailwindcss/vite';import react from '@vitejs/plugin-react'
export default defineConfig({ plugins: [ react(), tailwindcss(), ],})Setup Vite for Vue app
Section titled “Setup Vite for Vue app”vite.config.ts
import { defineConfig } from 'vite'import tailwindcss from '@tailwindcss/vite';import vue from '@vitejs/plugin-vue'
export default defineConfig({ plugins: [ tailwindcss(), vue(), ],})⚛️ Use with React
Section titled “⚛️ Use with React”Import the styles
Section titled “Import the styles”Create the stylesheet file
Section titled “Create the stylesheet file”index.css
@import '@fintech-sandpit/ui/style/base.css';@import '@fintech-sandpit/ui/style/palette.css';Import the stylesheet file in your app
Section titled “Import the stylesheet file in your app”main.tsx
import { StrictMode } from 'react';import { createRoot } from 'react-dom/client';import App from './App.tsx';import './index.css'; /* <- make sure the stylesheet file is imported */
const root = document.getElementById('root');
if (root) { createRoot(root).render( <StrictMode> <App /> </StrictMode>, )} else { alert('No root element found! Application will not start.');}Import and use the Components
Section titled “Import and use the Components”component.tsx
import { Button } from '@fintech-sandpit/ui/react';
return ( <Button colorScheme="primary" variant="outline" size="lg" > Click me </Button>);🔰 Use with Vue
Section titled “🔰 Use with Vue”Import the styles
Section titled “Import the styles”Create the stylesheet file
Section titled “Create the stylesheet file”index.css
@import '@fintech-sandpit/ui/style/base.css';@import '@fintech-sandpit/ui/style/palette.css';Import the stylesheet file in your app
Section titled “Import the stylesheet file in your app”app.vue
<style lang="css">@import "@fintech-sandpit/ui/style/base.css";@import "@fintech-sandpit/ui/style/palette.css";</style>Import and use the Components
Section titled “Import and use the Components”component.vue
<script setup lang="ts">import { Button } from '@fintech-sandpit/ui/vue';</script>
<template> <Button color-scheme="primary" variant="outline" size="lg" > Click me </Button></template>