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.
- Run
npm install commandbar-launcher
.
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 | {} |
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>} />