A Y2K-inspired component library with translucent materials, chrome effects, and futuristic aesthetics
npm install y2k-uiA React component library inspired by the translucent, futuristic design of early 2000s portable stereo systems. Features glass morphism effects, chrome surfaces, electric blue accents, and nostalgic Y2K aesthetics.
- 🎨 Y2K Aesthetic: Translucent materials, chrome effects, electric blues
- 🔮 Glass Morphism: Modern glassmorphism effects with backdrop blur
- 🎛️ Interactive Components: Stereo player, brand kit showcase, and more
- 🎯 TypeScript: Full TypeScript support with proper type definitions
- 🎨 Tailwind CSS: Built with Tailwind CSS v4 for easy customization
- 📱 Responsive: Mobile-first responsive design
- ♿ Accessible: Built on Radix UI primitives for accessibility
- 🎪 Storybook: Comprehensive component documentation
``bash`
npm install @y2k-tech/uior
yarn add @y2k-tech/uior
pnpm add @y2k-tech/ui
This library requires:
- React 16.8+
- Tailwind CSS v4+
- The following fonts (automatically loaded):
- Inter (body text)
- Orbitron (display/headings)
- JetBrains Mono (code/digital displays)
Add the Y2K UI styles to your app:
`tsx`
// In your main CSS file or _app.tsx
import "@y2k-tech/ui/styles";
Add the Y2K design tokens to your tailwind.config.js:
`js`
/* @tailwind-config /
module.exports = {
content: [
'./pages/*/.{js,ts,jsx,tsx,mdx}',
'./components/*/.{js,ts,jsx,tsx,mdx}',
'./app/*/.{js,ts,jsx,tsx,mdx}',
'./node_modules/@y2k-tech/ui/*/.{js,ts,jsx,tsx}',
],
theme: {
extend: {
colors: {
'y2k-electric-blue': '#0066ff',
'y2k-cyan': '#00ccff',
'y2k-chrome': '#c0c8d8',
'y2k-silver': '#8892a6',
'y2k-dark-chrome': '#4a5568',
'y2k-glow': 'rgba(0, 204, 255, 0.3)',
},
fontFamily: {
'display': ['Orbitron', 'Inter', 'system-ui', 'sans-serif'],
'mono': ['JetBrains Mono', 'Consolas', 'Monaco', 'monospace'],
},
},
},
}
Import only the components you need:
`tsx
import { BrandKit } from "@y2k-tech/ui";
import { StereoPlayer } from "@y2k-tech/ui";
import { Button, Card, Badge } from "@y2k-tech/ui";
function MyApp() {
return (
$3
A configurable banner component composed from Y2K primitives. See also:
docs/components/announcement-banner.md.`tsx
import { AnnouncementBanner } from "@y2k-tech/ui"; variant="electric"
badge="ALERT"
title="Announcement"
message="Details go here"
animated
dismissible
/>
`$3
`tsx
import {
BrandKit,
StereoPlayer,
Button,
Card,
CardContent,
CardHeader,
CardTitle,
Badge,
y2kTheme,
y2kClasses,
} from "@y2k-tech/ui";
`$3
A comprehensive showcase of the Y2K design system:
`tsx
import { BrandKit } from "@y2k-tech/ui";function App() {
return (
);
}
`$3
An interactive stereo player with Y2K aesthetics:
`tsx
import { StereoPlayer } from "@y2k-tech/ui";function MusicApp() {
return (
);
}
`$3
All components come with built-in Y2K styling:
`tsx
import {
Button,
Card,
CardContent,
CardHeader,
CardTitle,
Badge,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
useIsMobile,
} from "@y2k-tech/ui";function Dashboard() {
return (
Y2K Dashboard
Status
);
}
`🎨 Styling System
$3
The library includes custom utility classes for Y2K effects:
`css
.glass-card / Glass morphism card effect /
.chrome-surface / Metallic chrome gradient /
.glow-blue / Electric blue glow effect /
.button-3d / 3D button with depth /
.font-display / Orbitron display font /
.text-tech / Uppercase tech text styling /
.text-digital / Monospace digital display text /
`$3
`tsx
import { y2kClasses } from "@y2k-tech/ui";function TechInterface() {
return (
className={${y2kClasses.fontDisplay} ${y2kClasses.textTech} text-2xl mb-4}
>
SYSTEM STATUS
className={y2kClasses.chromeSurface + " p-4 rounded-lg"}
>
12:34:56 • ONLINE
className={${y2kClasses.button3d} ${y2kClasses.glowBlue} px-6 py-2 rounded-lg}
>
ACTIVATE
🎨 Theme Configuration
$3
`tsx
import { y2kTheme } from "@y2k-tech/ui";// Access colors
const primaryColor = y2kTheme.colors.electricBlue; // '#0066ff'
const accentColor = y2kTheme.colors.cyan; // '#00ccff'
// Access fonts
const displayFont = y2kTheme.fonts.display; // 'Orbitron', 'Inter', ...
const monoFont = y2kTheme.fonts.mono; // 'JetBrains Mono', ...
`$3
| Color | Hex | Usage |
| ------------- | --------- | ---------------------- |
| Electric Blue |
#0066ff | Primary actions, links |
| Cyan | #00ccff | Highlights, accents |
| Chrome | #c0c8d8 | Metallic surfaces |
| Silver | #8892a6 | Secondary text |
| Dark Chrome | #4a5568 | Dark metallic elements |🎯 TypeScript Support
Full TypeScript support with comprehensive type definitions:
`tsx
import type { Y2KTheme, Y2KColors } from "@y2k-tech/ui";interface AppProps {
theme?: Y2KTheme;
primaryColor?: keyof Y2KColors;
}
// Component props are fully typed
import { ButtonProps } from "@y2k-tech/ui";
const CustomButton: React.FC = (props) => {
return ;
};
`📦 What's Exported
$3
-
BrandKit - Complete design system showcase
- StereoPlayer - Interactive stereo interface$3
- All shadcn/ui components with Y2K styling
-
Button, Card, Badge, Tabs, Slider, etc.$3
-
y2kTheme - Theme configuration object
- y2kClasses - CSS class name constants
- Type definitions for all components$3
Import styles separately:
`tsx
import "@y2k-tech/ui/styles";
`$3
Utility hooks for responsive design:
`tsx
import { useIsMobile } from "@y2k-tech/ui";function ResponsiveComponent() {
const isMobile = useIsMobile();
return (
className={isMobile ? "mobile-layout" : "desktop-layout"}
>
{isMobile ? "Mobile View" : "Desktop View"}
📖 Storybook
View all components in Storybook:
`bash
npm run storybook
`Visit
http://localhost:6006 to explore the component library.🛠️ Development
`bash
Clone the repository
git clone https://github.com/y2k-tech/ui.git
cd uiInstall dependencies
npm installStart development server
npm run devBuild the library
npm run buildRun demo app
npm run demo
`🎨 Customization
$3
`css
:root {
--y2k-electric-blue: #0066ff;
--y2k-cyan: #00ccff;
--y2k-chrome: #c0c8d8;
/ ... other Y2K variables /
}
`$3
`tsx
Futuristic content
`🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🎵 Inspiration
This component library was inspired by the translucent blue stereo systems of the early 2000s, capturing the optimistic, tech-forward aesthetic of the Y2K era.
🧑💻 Next.js Usage
This library is fully compatible with Next.js (including the App Router and Pages Router). To use in your Next.js project:
1. Install peer dependencies (if not already present):
`bash
npm install react react-dom next @radix-ui/react-* lucide-react cmdk embla-carousel-react input-otp next-themes react-day-picker react-hook-form react-resizable-panels recharts sonner vaul
`
(You may only need a subset depending on which components you use.)2. Import styles in your custom
_app.tsx or layout file:
`tsx
import "@y2k-tech/ui/styles";
`3. SSR/CSR Compatibility:
- All components are SSR-safe and support Next.js streaming.
- For best results, use components inside a
"use client" boundary if they use interactivity.4. Tailwind Setup:
- Ensure your
tailwind.config.js includes the library in the content` array (see above).5. Fonts:
- The library expects Inter, Orbitron, and JetBrains Mono fonts. You can use Next.js font optimization or import from Google Fonts.
6. Tree-shaking:
- Only import the components you use for optimal bundle size.
---
Made with ❤️ and a healthy dose of Y2K nostalgia