Skip to content

tryfoobar/commandbar-launcher

Folders and files

NameName
Last commit message
Last commit date
Apr 13, 2022
Apr 13, 2022
Apr 18, 2022
Sep 28, 2020
Sep 28, 2020
Sep 28, 2020
Sep 28, 2020
Apr 13, 2022
Sep 28, 2020
Aug 17, 2023
Aug 17, 2023
Aug 17, 2023

Repository files navigation

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>} />