# Prompt Operators

Prompt operators allow conditional statements to be applied to commands, target, and or specifiers.

## Prompt Operator Example

### Prompt&#x20;

{% code overflow="wrap" %}

```
prompt: 
create a navigation bar or drawer for a bicycle rental web app in react chakra ui
```

{% endcode %}

### Response

Here's an example of how you can create a navigation bar using React Chakra UI:

{% code overflow="wrap" %}

```javascript
import { Box, Flex, Link, Text } from "@chakra-ui/core";

const Navbar = () => (
  <Flex
    as="nav"
    align="center"
    justify="space-between"
    wrap="wrap"
    padding="1.5rem"
    bg="teal.500"
    color="white"
  >
    <Flex align="center" mr={5}>
      <Text fontSize="xl">Bicycle Rental</Text>
    </Flex>

    <Box display={{ sm: "block", md: "none" }} onClick={toggle}>
      <svg
        fill="white"
        width="12px"
        viewBox="0 0 20 20"
        xmlns="http://www.w3.org/2000/svg"
      >
        <title>Menu</title>
        <path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
      </svg>
    </Box>

    <Box
      display={{ sm: show ? "block" : "none", md: "flex" }}
      width={{ sm: "full", md: "auto" }}
      alignItems="center"
      flexGrow={1}
    >
      <Link
        mx="3"
        fontWeight="medium"
        color="white"
        fontSize="lg"
        _hover={{ color: "teal.200" }}
      >
        Home
      </Link>
      <Link
        mx="3"
        fontWeight="medium"
        color="white"
        fontSize="lg"
        _hover={{ color: "teal.200" }}
      >
        Bikes
      </Link>
      <Link
        mx="3"
        fontWeight="medium"
        color="white"
        fontSize="lg"
        _hover={{ color: "teal.200" }}
      >
        Rentals
      </Link>
    </Box>
  </Flex>
);

export default Navbar;
```

{% endcode %}

This creates a navigation bar with the name "Bicycle Rental", a menu icon for small screens, and links for "Home", "Bikes", and "Rentals". You can adjust the styles to match your desired design.

{% hint style="info" %}
The operator in the above prompt is “or” and is used in the target of the request.
{% endhint %}

Operators in prompting are typically synonymous with operators in programming languages or applications that use formulas.

**Examples of Operators:**

* AND
* IN
* OR
* EQUALS
* LESS THAN
* GREATER THAN
* NOT IN
* CONTAINS


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gdf.ai/gdf-full-stack-engineering/prompting/prompt-operators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
