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

oneview-react-multiselect-component

v5.0.0

Published

Modern React MultiSelect component with tags, search, and custom templates for OneView V2

Downloads

12

Readme

oneview-react-multiselect

npm version TypeScript React Tailwind CSS

A modern, accessible React MultiSelect component with tags, search, and custom templates. Built for OneView V2 with enterprise-grade features and beautiful design.

📖 Live Documentation & Examples →

Interactive documentation with live examples, API reference, and code samples.

✨ Features

  • 🔍 Search & Filter - Built-in search with real-time filtering
  • Dynamic Creation - Create new tags on-the-fly
  • 🎨 Custom Templates - Flexible UI customization for selected items
  • Accessibility - ARIA labels and keyboard navigation
  • 🎭 Multiple Variants - Different tag styles and orientations
  • 📱 Responsive - Works seamlessly across screen sizes
  • 🔷 TypeScript - Full type safety and IntelliSense support
  • 🎯 OneView V2 Ready - Enterprise design system compliance

🚀 Installation

npm install oneview-react-multiselect

📖 Usage

Basic Example

import React, { useState } from "react";
import { MultiSelect, type MultiSelectItem } from "oneview-react-multiselect";

function App() {
  const [selectedItems, setSelectedItems] = useState<MultiSelectItem[]>([]);

  const options: MultiSelectItem[] = [
    { id: 1, label: "React" },
    { id: 2, label: "TypeScript" },
    { id: 3, label: "Tailwind CSS" },
    { id: 4, label: "Node.js" },
  ];

  return (
    <MultiSelect
      label="Technologies"
      value={selectedItems}
      options={options}
      onChange={setSelectedItems}
      addButtonText="Add Technology"
      searchPlaceholder="Search technologies..."
    />
  );
}

Advanced Example with Custom Template

import React, { useState } from "react";
import {
  MultiSelect,
  Tag,
  type MultiSelectItem,
} from "oneview-react-multiselect";

// Custom selected item component
const CustomSelectedItem = ({ item, onRemove, removable }) => (
  <div className="flex items-center gap-2 p-2 bg-blue-50 rounded-md">
    <span className="font-medium text-blue-900">{item.label}</span>
    {removable && (
      <button onClick={onRemove} className="text-blue-600 hover:text-blue-800">
        ×
      </button>
    )}
  </div>
);

function AdvancedExample() {
  const [selectedItems, setSelectedItems] = useState<MultiSelectItem[]>([]);

  const options: MultiSelectItem[] = [
    { id: 1, label: "Frontend Development" },
    { id: 2, label: "Backend Development", disabled: true },
    { id: 3, label: "DevOps" },
    { id: 4, label: "UI/UX Design" },
  ];

  return (
    <MultiSelect
      label="Skills"
      value={selectedItems}
      options={options}
      onChange={setSelectedItems}
      selectedItemUI={CustomSelectedItem}
      orientation="vertical"
      fullWidthButton={true}
      maxWidth="100%"
    />
  );
}

📋 API Reference

MultiSelect Props

| Prop | Type | Default | Description | | ------------------- | ------------------------------------ | --------------- | ------------------------------------- | | label | string | "Tags" | Label displayed next to the component | | value | MultiSelectItem[] | [] | Currently selected items | | options | MultiSelectItem[] | [] | Available options to select from | | onChange | (items: MultiSelectItem[]) => void | - | Callback when items change | | selectedItemUI | React.ComponentType | Tag | Custom component for selected items | | addButtonText | string | "Add Tags" | Text on the add button | | searchPlaceholder | string | "Search tags" | Search input placeholder | | maxWidth | string | "568px" | Maximum component width | | orientation | "horizontal" \| "vertical" | "horizontal" | Layout direction | | size | "sm" \| "default" \| "lg" | "default" | Component size | | disabled | boolean | false | Whether component is disabled | | showAddButton | boolean | true | Whether to show add button | | allowRemove | boolean | true | Whether items can be removed | | fullWidthButton | boolean | false | Full-width add button |

MultiSelectItem Interface

interface MultiSelectItem {
  id: string | number;
  label: string;
  disabled?: boolean;
}

Tag Props

| Prop | Type | Default | Description | | ----------- | ------------------------------------------------------------------------------- | ----------- | -------------------------- | | label | string | - | Tag text content | | variant | "default" \| "secondary" \| "destructive" \| "success" \| "warning" \| "info" | "default" | Tag color variant | | size | "sm" \| "default" \| "lg" | "default" | Tag size | | removable | boolean | true | Whether tag can be removed | | onRemove | () => void | - | Remove callback | | loading | boolean | false | Loading state |

🎨 Styling

This component uses Tailwind CSS classes and is designed for the OneView V2 design system. The default styles include:

  • Colors: Primary blue (#008BC9), tag background (#E8F3FF)
  • Typography: Poppins font family with specific letter spacing
  • Spacing: Consistent padding and margins following OneView V2 specs

Custom CSS Variables

You can customize the component by overriding these CSS variables:

:root {
  --multiselect-primary: #008bc9;
  --multiselect-tag-bg: #e8f3ff;
  --multiselect-text-primary: #212529;
  --multiselect-text-secondary: #4c5564;
}

🔧 Development

Prerequisites

  • React 16.8+
  • TypeScript 5.5+
  • Tailwind CSS 3.0+

Peer Dependencies

The following packages are required in your project:

npm install react react-dom

Optional Dependencies

For full functionality, install these Tailwind CSS plugins:

npm install tailwindcss @tailwindcss/typography

🌟 Examples

Different Orientations

// Horizontal (default)
<MultiSelect orientation="horizontal" {...props} />

// Vertical
<MultiSelect orientation="vertical" {...props} />

Tag Variants

import { Tag } from "oneview-react-multiselect";

<Tag label="Default" variant="default" />
<Tag label="Success" variant="success" />
<Tag label="Warning" variant="warning" />
<Tag label="Error" variant="destructive" />

Disabled State

<MultiSelect
  disabled={true}
  value={selectedItems}
  options={options}
  onChange={setSelectedItems}
/>

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

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

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🏢 OneView V2

This component is part of the OneView V2 design system, built specifically for healthcare enterprise applications with:

  • ✅ WCAG 2.1 AA accessibility compliance
  • ✅ Enterprise-grade performance
  • ✅ Consistent design language
  • ✅ Comprehensive documentation

Built with ❤️ for the React community

Report BugRequest FeatureDocumentation