npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sylonikse/macos-ui

v0.2.0

Published

Authentic macOS-style React component library with copy-paste components. Built with TypeScript, Tailwind CSS, and React.

Readme

@sylonik/macos-ui

Authentic macOS-style React components built with TypeScript, Tailwind CSS, and love.

npm version License: MIT TypeScript React Build Status Tailwind CSS

A collection of beautiful, accessible macOS-style React components. Copy-paste them into your project, customize freely, and own the source code. Inspired by shadcn/ui.

Features

Pixel-Perfect macOS Design - Faithfully recreated components including Window, Dock, MenuBar, and DesktopIcon with authentic styling and animations.

📋 Copy & Paste - Install individual components into your project using the CLI. Own the code, customize freely, no dependency lock-in.

🎨 TypeScript First - Built with TypeScript in strict mode. Full type safety with exported interfaces for all component props and configurations.

🎨 Themeable - Comprehensive theming system using CSS custom properties and a Tailwind CSS preset. Light and dark mode out of the box.

Accessible - WCAG 2.1 AA compliant with proper ARIA attributes, keyboard navigation, and focus management.

🧪 Thoroughly Tested - 76+ tests including unit, property-based (fast-check), and E2E (Playwright) with 80% code coverage.

Quick Start

Installation

Initialize your project and add components:

# Initialize the project
npx macos-ui init

# Add individual components
npx macos-ui add window dock menu-bar desktop-icon

# Or add all components at once
npx macos-ui add --all

Basic Usage

import { Window, WindowManagerProvider, useWindowManager } from '@sylonik/macos-ui'
import { Home } from 'lucide-react'

function App() {
  return (
    <WindowManagerProvider>
      <Desktop />
    </WindowManagerProvider>
  )
}

function Desktop() {
  const { openWindow } = useWindowManager()

  return (
    <button onClick={() => openWindow({
      id: 'home',
      title: 'Welcome',
      icon: Home,
      content: 'Hello, macOS!'
    })}>
      Open Window
    </button>
  )
}

Components

Window

Draggable, resizable windows with macOS-style traffic light buttons (close, minimize, maximize).

Features:

  • Customizable size and position
  • Resizable with corner handle
  • Draggable title bar
  • Traffic light buttons with callbacks
  • Focus management and z-index ordering
  • Keyboard accessibility (Tab, Escape)

Dock

Application launcher bar with magnification effect, badges, and running indicators.

Features:

  • Three positioning options (bottom, left, right)
  • Smooth magnification on hover
  • Running indicator dots
  • Notification badges
  • Icon labels on hover
  • Accessible with aria-labels

MenuBar

System-level navigation bar with dropdown menus, keyboard navigation, and customizable status area.

Features:

  • Dropdown menus with hover/click
  • Nested submenu support
  • Keyboard navigation (Arrow keys, Escape)
  • Divider and disabled items
  • Custom status area (right side)
  • Focus management

DesktopIcon

Clickable desktop application icons with selection states and keyboard support.

Features:

  • Single and double-click handlers
  • Selected state styling with ring
  • Customizable colors
  • Icon + label layout
  • Keyboard support (Enter, Space)
  • Accessible button behavior

Documentation

Full documentation is available at sylonik.github.io/macos-ui

CLI Commands

# Initialize project with configuration and theme
npx macos-ui init

# Add specific components
npx macos-ui add window dock

# Add all components
npx macos-ui add --all

# Options
npx macos-ui add window --overwrite  # Overwrite existing components
npx macos-ui add window --path src/ui  # Custom destination path
npx macos-ui init --yes  # Skip prompts, use defaults

Copy & Paste Philosophy

Unlike traditional npm packages, @sylonik/macos-ui uses a copy-paste model:

Own the Code - Copy components directly into your project
Full Control - Modify styling, props, and behavior freely
No Lock-In - Zero runtime dependencies (except React, Tailwind)
Smaller Bundles - Only ship what you use

This approach is inspired by shadcn/ui and prioritizes developer freedom over convenience.

Theming

Components use CSS custom properties for theming. Customize colors, spacing, shadows, and more:

:root {
  --macos-background: hsl(0, 0%, 100%);
  --macos-foreground: hsl(0, 0%, 0%);
  --macos-primary: hsl(221, 100%, 50%);
  /* ... and more */
}

@media (prefers-color-scheme: dark) {
  :root {
    --macos-background: hsl(0, 0%, 7%);
    --macos-foreground: hsl(0, 0%, 100%);
  }
}

Use the Tailwind preset for utility classes:

import { cn } from '@sylonik/macos-ui'

<div className={cn('bg-macos-background', 'text-macos-foreground')}>
  Content
</div>

TypeScript Support

Full TypeScript support with strict mode enabled:

import type {
  WindowProps,
  DockProps,
  MenuBarProps,
  DesktopIconProps,
} from '@sylonik/macos-ui'

Accessibility

All components are built with accessibility in mind:

  • WCAG 2.1 AA compliant
  • Keyboard Navigation - Full keyboard support for all components
  • ARIA Attributes - Proper roles, labels, and live regions
  • Focus Management - Visible focus indicators and focus trapping where needed
  • Screen Readers - Tested with VoiceOver, NVDA, and Jaws

Learn more in the Accessibility Guide.

Contributing

We love contributions! Please see CONTRIBUTING.md for guidelines on:

  • Setting up development environment
  • Creating new components
  • Writing tests
  • Submitting pull requests

License

MIT License - see LICENSE for details.

Security

Please report security vulnerabilities responsibly. See SECURITY.md for details.

Community

Changelog

See CHANGELOG.md for version history and release notes.


Built with ❤️ by Sylonik