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

@khanhromvn/zenui

v1.0.5

Published

Modern, flexible and customizable UI component library for React + Vite + Tailwind CSS

Readme

ZenUI

Modern, flexible and customizable UI component library for React + Vite + Tailwind CSS projects.

npm version license

🚀 Features

  • ⚡️ Built for React + Vite + Tailwind CSS
  • 🎨 Highly customizable with extensive props
  • 🎭 Beautiful animations powered by Framer Motion
  • 📦 Tree-shakeable - import only what you need
  • 💪 Full TypeScript support
  • 🎯 Zero external CSS required

📦 Installation

npm install @khanhromvn/zenui framer-motion lucide-react
# or
yarn add @khanhromvn/zenui framer-motion lucide-react
# or
pnpm add @khanhromvn/zenui framer-motion lucide-react

Note: ZenUI requires framer-motion and lucide-react as peer dependencies.

🎯 Requirements

  • React >= 18.0.0
  • Tailwind CSS >= 3.0.0
  • Vite (recommended)

🔧 Setup

Make sure you have Tailwind CSS configured in your project. If not, follow the official guide.

📖 Usage

Drawer Component

import { Drawer } from '@khanhromvn/zenui';
// or
import Drawer from '@khanhromvn/zenui/Drawer';

function App() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <>
      <button onClick={() => setIsOpen(true)}>
        Open Drawer
      </button>

      <Drawer
        isOpen={isOpen}
        onClose={() => setIsOpen(false)}
        title="My Drawer"
        subtitle="This is a subtitle"
        direction="right"
        width="400px"
      >
        <div style={{ padding: '1.5rem' }}>
          Your content here
        </div>
      </Drawer>
    </>
  );
}

Props

Core Props

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | isOpen | boolean | ✅ | - | Controls drawer visibility | | onClose | () => void | ✅ | - | Callback when drawer closes | | children | ReactNode | ✅ | - | Drawer content |

Basic Configuration

| Prop | Type | Default | Description | |------|------|---------|-------------| | title | string | - | Drawer title | | subtitle | string | - | Drawer subtitle | | direction | 'left' \| 'right' \| 'top' \| 'bottom' | 'right' | Opening direction | | headerActions | ReactNode | - | Custom header actions | | footerActions | ReactNode | - | Footer action buttons | | className | string | '' | Custom CSS class |

Visibility & Behavior

| Prop | Type | Default | Description | |------|------|---------|-------------| | hideHeader | boolean | false | Hide header section | | showCloseButton | boolean | true | Show close button | | closeOnOverlayClick | boolean | true | Close on overlay click | | overlayOpacity | number | 0.5 | Overlay opacity (0-1) | | enableBlur | boolean | false | Enable backdrop blur |

Animation

| Prop | Type | Default | Description | |------|------|---------|-------------| | animationType | 'slide' \| 'scale' \| 'fade' \| 'bounce' \| 'elastic' | 'slide' | Animation type |

Dimensions

| Prop | Type | Default | Description | |------|------|---------|-------------| | width | string \| number | '25%' | Drawer width (for left/right) | | height | string \| number | '25%' | Drawer height (for top/bottom) | | marginLeft | number | 0 | Left margin in pixels | | marginRight | number | 0 | Right margin in pixels | | marginTop | number | 0 | Top margin in pixels | | marginBottom | number | 0 | Bottom margin in pixels |

Advanced Styling

| Prop | Type | Description | |------|------|-------------| | padding | DrawerSpacing | Custom padding | | margin | DrawerSpacing | Custom margin | | border | DrawerBorder | Border styling | | shadow | DrawerShadow \| DrawerShadow[] | Shadow effects | | opacity | number | Drawer opacity | | backdropBlur | string \| number | Backdrop blur amount | | backgroundColor | string | Background color |

Section-Specific Styling

| Prop | Type | Description | |------|------|-------------| | headerBackgroundColor | string | Header background | | bodyBackgroundColor | string | Body background | | footerBackgroundColor | string | Footer background | | headerBorder | DrawerSectionBorder | Header border | | footerBorder | DrawerSectionBorder | Footer border |

Advanced Examples

Custom Width with Fractions

<Drawer
  isOpen={isOpen}
  onClose={onClose}
  width="1/2"  // 50% width
  direction="right"
>
  {/* Content */}
</Drawer>

Full Height Drawer from Bottom

<Drawer
  isOpen={isOpen}
  onClose={onClose}
  direction="bottom"
  height="full"
>
  {/* Content */}
</Drawer>

Drawer with Custom Animations

<Drawer
  isOpen={isOpen}
  onClose={onClose}
  animationType="elastic"
  enableBlur={true}
>
  {/* Content */}
</Drawer>

Drawer with Footer Actions

<Drawer
  isOpen={isOpen}
  onClose={onClose}
  title="Confirm Action"
  footerActions={
    <>
      <button onClick={onClose}>Cancel</button>
      <button onClick={handleConfirm}>Confirm</button>
    </>
  }
>
  {/* Content */}
</Drawer>

Drawer with Custom Styling

<Drawer
  isOpen={isOpen}
  onClose={onClose}
  backgroundColor="#f9fafb"
  headerBackgroundColor="#ffffff"
  shadow={{
    offsetX: 0,
    offsetY: 4,
    blur: 16,
    spread: 0,
    color: "rgba(0, 0, 0, 0.1)"
  }}
  border={{
    width: { all: 1 },
    style: "solid",
    color: "#e5e7eb",
    radius: { all: 8 }
  }}
>
  {/* Content */}
</Drawer>

📘 Type Definitions

All components are fully typed with TypeScript. Import types as needed:

import type {
  DrawerProps,
  DrawerDirection,
  DrawerAnimationType,
  DrawerSpacing,
  DrawerBorder,
  DrawerShadow
} from '@khanhromvn/zenui';

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

MIT © KhanhRomVN

📧 Contact

🗺️ Roadmap

  • [ ] More components (Modal, Tooltip, Dropdown, etc.)
  • [ ] Dark mode support
  • [ ] More animation presets
  • [ ] Storybook documentation
  • [ ] Accessibility improvements

Made with ❤️ by KhanhRomVN