Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.92 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.92 KB

commandbar-launcher

npm version package size downloads dependencies

This component is a launcher to open CommandBar. It looks like a search bar and can be slotted into any react app. On click, it'll open the CommandBar.

Installation

  • Run npm install commandbar-launcher.

API

Name Type Description Default
text string or HTMLElement The element to render in the launcher Find anything [ctrl+k]
style CSSProperties Style overrides for the launcher {}

Examples

Default usage:

import Launcher from 'commandbar-launcher';
import "commandbar-launcher/assets/index.css";

export const MyLauncher = () => {
  return <Launcher />;
}

Example with changed styles:

<Launcher style={{ fontWeight: 700, textAlign: "center", background: "black", color: "white" }} />

Example with changed text:

<Launcher text={<div style={{color:'purple'}}>Click to search in this app</div>} />