Skip to content

tryfoobar/react-native-commandbar

Repository files navigation

CommandBar Logo

React Native CommandBar

CI

Copilot & HelpHub in React Native

About

React Native CommandBar was built as a wrapper around CommandBarIOS and CommandBarAndroid repos and uses both as dependencies.

Installation

yarn add @commandbar/react-native
npm install @commandbar/react-native

Usage

Run the Example App

  1. Clone the repo: git clone https://github.com/tryfoobar/react-native-commandbar && cd react-native-commandbar
  2. Install dependencies: yarn
  3. Run the example: yarn example ios or yarn example android

Open HelpHub Bottom Sheet

import { Button, View } from 'react-native';
import { CommandBar } from 'react-native-commandbar';

const MyComponent = () => {
  return (
    <View>
      <Button
        title="Open"
        onPress={() => CommandBar.openHelpHub({ orgId: 'your_org_id' })}
      />
    </View>
  );
};

Render a HelpHub View

import { Button, View } from 'react-native';

const MyComponent = () => {
  return (
    <View style={{ flex: 1 }}>
      <HelpHubView orgId="your_org_id" />
    </View>
  );
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library