Skip to content

๐Ÿช„ A beautifully command menu for React. Built with headlessUI.

License

Notifications You must be signed in to change notification settings

pheralb/superkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Getting Started ย ย โ€ขย ย  Examples ย ย โ€ขย ย  Contribute

Superkey Minzip Package Size GitHub releases GitHub stars GitHub issues GitHub license

๐Ÿ‘‹ Introduction

Superkey is a stylized command palette component built with React, Tailwind CSS & HeadlessUI ready to be used in your next project.

โœจ Features

  • โœ… Easy to install.
  • โœ… Support for keyboard navigation.
  • โœ… Fully customizable.
  • โœ… Fully tested, typed and reliable.

๐Ÿ‘จโ€๐Ÿš€ Getting Started

  1. Install Superkey:
# with npm:
npm install superkey @headlessui/react

# with yarn:
yarn add superkey @headlessui/react

# with pnpm:
pnpm install superkey @headlessui/react

# with ultra:
ultra install superkey @headlessui/react
  1. Add styles:
import "superkey/styles.css";
  1. Create your first command palette component:
import { useState } from "react";
import { Command, CommandInput, CommandList, CommandOption } from "superkey";

function App() {
  const [open, setOpen] = useState(false);
  return (
    <Command
      open={open}
      onClose={() => {
        setOpen(false);
      }}
    >
      <CommandInput
        onChange={(e) => {
          console.log(e.target.value);
        }}
      />
      <CommandList>
        <CommandOption value="Option 1">
          <h1>Option 1</h1>
          <p>Description</p>
        </CommandOption>
        <CommandOption value="Option 2">
          <h1>Option 2</h1>
          <p>Description</p>
        </CommandOption>
      </CommandList>
    </Command>
  );
}

๐Ÿค Contributing

  1. Fork and clone the repository:
git clone [email protected]:your-username/superkey.git
  1. Install dependencies:
npm install
# or
yarn install
# or
ultra install
# or
pnpm install
  1. Run turborepo:
npm run dev
# or
yarn dev
# or
ultra dev
# or
pnpm dev

๐Ÿ”ง Stack

  • Tailwind CSS - Rapidly build modern websites without ever leaving your HTML.
  • Headless UI - Completely unstyled, fully accessible UI components.
  • Next.js + Contentlayer - Content made easy for developers.
  • SWC - Rust-based platform for the Web.

๐Ÿ”‘ License