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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@shortround/mui

v0.2.2

Published

Material UI components for Shortround, a command palette and intentional UI library.

Downloads

171

Readme

@shortround/mui

Material-UI themed components for ShortRound command palette library.

Installation

npm install @shortround/core @shortround/mui

Peer Dependencies:

npm install @mui/material @emotion/react @emotion/styled @mui/icons-material lucide-react

Quick Start

import { ShortRoundSidekick } from '@shortround/core';
import { MuiSidekickComponents, useMuiToast } from '@shortround/mui';

const intentions = [
  {
    id: 'search',
    title: 'Search Items',
    group: 'Actions',
    icon: 'search', // Uses Lucide React icons
    action: async (input) => {
      return { intentions: searchResults };
    }
  }
];

function App() {
  const { showToast, ToastProvider } = useMuiToast();

  return (
    <ToastProvider>
      <div>
        <h1>My App</h1>
        <ShortRoundSidekick 
          title="Command Palette"
          defaultIntentions={intentions}
          SidekickComponents={MuiSidekickComponents}
          showToast={showToast}
          installKeyboardShortcuts={true}
        />
      </div>
    </ToastProvider>
  );
}

Components

MuiSidekickComponents

Pre-built Material-UI components for the sidekick interface:

import { MuiSidekickComponents } from '@shortround/mui';

// Contains:
// - IntentionPalette.Item, Input, Group, Frame, NoMatches
// - Sidekick.ControlBar, Frame, Popover  
// - SidecarContent

Toast Integration

import { useMuiToast, MuiToastProvider } from '@shortround/mui';

function MyComponent() {
  const { showToast } = useMuiToast();
  
  // Use in intention actions
  const intention = {
    id: 'save',
    title: 'Save Item',
    action: async (input) => {
      // ... save logic
      return { 
        message: 'Item saved successfully!',
        shouldReset: true 
      };
    }
  };

  return (
    <MuiToastProvider>
      <ShortRoundSidekick 
        showToast={showToast}
        // ... other props
      />
    </MuiToastProvider>
  );
}

Theming

Custom Theme

@shortround/mui simply consumes whatever MUI theme is already present in your React tree.
This keeps things predictable—just customize the theme exactly the same way you would in any MUI-only project.

import { createTheme, ThemeProvider } from '@mui/material/styles';
import { ShortRoundSidekick } from '@shortround/core';
import { MuiSidekickComponents } from '@shortround/mui';

// Your application theme
const myTheme = createTheme({
  palette: {
    primary: { main: '#546570' },
  },
  spacing: 4,
  shape: { borderRadius: 4 }
});

function App() {
  return (
    <ThemeProvider theme={myTheme}>
      <ShortRoundSidekick
        title="Short Round"
        SidekickComponents={MuiSidekickComponents}
        // ...other props
      />
    </ThemeProvider>
  );
}

For a working reference see examples/todo-app/src/MuiApp.jsx.

Custom Components

You can replace individual components:

import { MuiSidekickComponents } from '@shortround/mui';
import { MyCustomInput } from './MyCustomInput';

const CustomComponents = {
  ...MuiSidekickComponents,
  IntentionPalette: {
    ...MuiSidekickComponents.IntentionPalette,
    Input: MyCustomInput,
  },
};

Icons

Icons use Lucide React by default. Supported icon names include:

  • search, settings, user, home, back, cancel
  • Any valid Lucide React icon name

Custom icon mapping:

// In your intention
{
  id: 'custom',
  title: 'Custom Action',
  icon: 'star', // Maps to Lucide's Star icon
  action: async () => ({ shouldReset: true })
}

Keyboard Shortcuts

The MUI components support keyboard shortcuts displayed in the interface:

{
  id: 'save',
  title: 'Save Document',
  shortcut: 'Cmd+S',
  action: async () => {
    // Save logic
    return { message: 'Document saved!' };
  }
}

Sidekick Drawer

The sidekick drawer shows additional content alongside the command palette:

const intention = {
  id: 'edit-item',
  title: 'Edit Item',
  action: async (input) => {
    return {
      sideEffects: {
        sidecarRenderer: () => (
          <div style={{ padding: '16px' }}>
            <h3>Edit Form</h3>
            <form>
              {/* Your form content */}
            </form>
          </div>
        )
      }
    };
  }
};

Validation

Show validation messages in the input:

{
  id: 'create-item',
  title: 'Create New Item',
  validate: (input) => {
    if (!input.trim()) {
      return { valid: false, message: 'Name is required' };
    }
    if (input.length < 3) {
      return { valid: false, message: 'Name must be at least 3 characters' };
    }
    return { valid: true };
  },
  action: async (input) => {
    // Create item logic
    return { message: `Created "${input}"`, shouldReset: true };
  }
}

Complete Example

See the todo-app example for a full implementation showing:

  • Multiple intention workflows
  • Form validation
  • Sidekick drawer usage
  • Toast notifications
  • Custom theming

Other Packages

License

MIT