# Getting started

**Welcome!** Let's get started. We'll do the following:

1. Create your first feature flag.
2. Install the Reflag SDK.
3. Set feature access rules and/or remote configuration.
4. Enable Toolbar for local testing
5. Monitor your feature launch.

## 1. Create your first flag

Now let's create your first flag.

{% tabs %}
{% tab title="CLI" %}

```
npx @reflag/cli new
```

See [CLI docs](https://docs.reflag.com/api/cli).
{% endtab %}

{% tab title="UI" %}

1. [Sign up](https://app.reflag.com/) in the app
2. Click `New flag` in the sidebar.
3. Give your feature a name, and we'll suggest a `flag key` .

<figure><img src="https://2121209168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpgXAy2Cgsm5pON9oJ06m%2Fuploads%2FdvYyzjaGgmvCCzWJvlW6%2FScreenshot%202025-09-12%20at%2011.50.41.png?alt=media&#x26;token=988381c4-b95b-4e60-974c-0ab52805cc21" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="MCP" %}
You can create features from your code editor via our [MCP](https://docs.reflag.com/api/mcp).
{% endtab %}

{% tab title="Linear" %}
You can create features from within Linear by mentioning the `@reflag` [agent](https://docs.reflag.com/integrations/linear).
{% endtab %}
{% endtabs %}

Next, let's set up a Reflag SDK for your language and framework.

## 2. Install the Reflag SDK

Find the supported languages below:

<table data-view="cards" data-full-width="false"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>React</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/hLGOX0IhxObOYAT8CriU/react.svg">react.svg</a></td><td><a href="../supported-languages/react-sdk">react-sdk</a></td></tr><tr><td>React Native</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/hLGOX0IhxObOYAT8CriU/react.svg">react.svg</a></td><td><a href="../supported-languages/react-native-sdk">react-native-sdk</a></td></tr><tr><td>Vue.js</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/ZKT7OGmTQdNZDa3S59j5/vue-logo.svg">vue-logo.svg</a></td><td><a href="../supported-languages/vue-sdk">vue-sdk</a></td></tr><tr><td>Client-side</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/o6LlWpmNO73xUdEYzWqB/ts-js.svg">ts-js.svg</a></td><td><a href="../supported-languages/browser-sdk">browser-sdk</a></td></tr><tr><td>Server-side</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/gYLJ7ZQnjB4fNSzcIu1w/node-js.svg">node-js.svg</a></td><td><a href="../supported-languages/node-sdk">node-sdk</a></td></tr><tr><td>Next.js</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/kvuCSzQ8qyhLwSN4z8fm/next-js.svg">next-js.svg</a></td><td><a href="../supported-languages/next.js">next.js</a></td></tr><tr><td>Reflag supports OpenFeature</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/MeiUKBcSrz4sn4wkJQ4A/openfeature.svg">openfeature.svg</a></td><td><a href="../supported-languages/openfeature">openfeature</a></td></tr><tr><td>Don't use these languages or frameworks? Use our API</td><td><a href="https://content.gitbook.com/content/pgXAy2Cgsm5pON9oJ06m/blobs/kwtgYl14glJWbOtfM24e/api.svg">api.svg</a></td><td><a href="../api/public-api">public-api</a></td></tr></tbody></table>

### Code example for React

If you've installed the React SDK and have created a feature called `my-new-feature`, getting started will look like the following:

```jsx
import { useFlag } from "@reflag/react-sdk";

const MyFeature = () => {
  const { isEnabled } = useFlag("my-new-feature");

  return isEnabled ? "You have access!" : null;
};
```

You can now use `isEnabled` to gate access to the feature.

## 3. Set access rules

Head back over to [your dashboard](https://app.reflag.com/), select your feature and the `Access` tab.

<figure><img src="https://2121209168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpgXAy2Cgsm5pON9oJ06m%2Fuploads%2FJjMvJijTfqfp3uZcB0rt%2FAccess.png?alt=media&#x26;token=3d5d41ac-bc93-4544-906e-c820f4284491" alt=""><figcaption></figcaption></figure>

From here, you can define segments, companies, and users that will access your feature.

## 4. Enable Toolbar for local testing <a href="#next-steps-1" id="next-steps-1"></a>

In the frontend SDK, enable the Toolbar to toggle features locally.&#x20;

<figure><img src="https://2121209168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpgXAy2Cgsm5pON9oJ06m%2Fuploads%2FfngVAsRpYsve6owypfCB%2FCleanShot%202025-10-09%20at%2010%E2%80%AF.23.21%402x.png?alt=media&#x26;token=b4dbf871-f864-4258-9ddd-ff4660ae9acd" alt=""><figcaption></figcaption></figure>

In the React SDK, you enable it with `toolbar:`

```jsx
<ReflagProvider
   publishableKey=""
   context={}
   toolbar={true}
>
```

## 5. Monitor your feature launch <a href="#next-steps-1" id="next-steps-1"></a>

On the Monitor tab you can track real-time feature exposure, adoption and user feedback.

<figure><img src="https://2121209168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpgXAy2Cgsm5pON9oJ06m%2Fuploads%2FAh38CBwvQwzT6de0o9Nr%2FMonitor.png?alt=media&#x26;token=0e115411-6cba-4adc-97af-4e6fba14c01f" alt=""><figcaption></figcaption></figure>

### Track exposure

The Exposed chart shows you companies that have been exposed to your feature. This means, companies that have been checked for feature access as per your targeting rules and the check return "enabled".

### Track adoption

To track if exposed companies are also interacting with your feature, you can use `track` .

See the code example below.

### Get user feedback

To get feedback from your users, you can add a [static "Feedback" button](https://docs.reflag.com/product-handbook/launch-monitor#static-feedback-button) or you can [trigger a survey](https://docs.reflag.com/product-handbook/launch-monitor/automated-feedback-surveys), at the right time.

Here's an example with a static feedback button.

```tsx
import { useFlag } from "@reflag/react-sdk";

const MyFeature = () => {
  const { isEnabled, requestFeedback } = useFlag("my-new-feature");

  if (!isEnabled) {
    return null;
  }

  return (
    <>
      <button onClick={() => track()}>Use feature</button>
      <button
        onClick={() => requestFeedback({ title: "How do you like this new feature?" })}
      >
        Give feedback
      </button>
    </>
  );
}
```

## Get support

* Need some help? [Chat with us](mailto:hello@reflag.com)
* Latest product updates? [See Changelog](https://reflag.com/changelog)
* Create account: [Sign up](https://app.reflag.com/)
