> ## Documentation Index
> Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Language and Inclusivity

> Clear, inclusive, and user-friendly language helps all users navigate with ease and confidence.

export const LiveCode = ({children, customHeight, clickToLoad, example, fullWidth, fullHeight, hideCodeInLiveCode, screenshot, screenshotOnly, showCode: showCodeProp}) => {
  const SCREENSHOTS_BASE = "https://servicetitan.github.io/anvil2-docs-live-code/screenshots";
  const STACKBLITZ_BASE = "https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples";
  const [showCodeBlock, setShowCodeBlock] = useState(showCodeProp ?? false);
  const [isLocalOverride, setIsLocalOverride] = useState(false);
  useEffect(() => {
    const examplePath = `/images/live-code-screenshots-tmp/${example}.png`;
    fetch(examplePath, {
      method: "HEAD"
    }).then(r => {
      if (r.ok) setIsLocalOverride(true);
    }).catch(() => {});
  }, [example]);
  const screenshotBase = isLocalOverride ? "/images/live-code-screenshots-tmp" : SCREENSHOTS_BASE;
  if (screenshotOnly) {
    return <Frame className="flex flex-col">
        <div className="flex dark:hidden" style={{
      justifyContent: "center",
      alignItems: "center",
      width: fullWidth ? "100%" : "50%",
      minHeight: fullHeight ? "284px" : undefined,
      background: "#FFFFFF"
    }}>
          <img srcset={`${screenshotBase}/${example}.png, ${screenshotBase}/${example}-2x.png 2x`} src={`${screenshotBase}/${example}.png`} alt={example} noZoom />
        </div>
        <div className="hidden dark:flex" style={{
      justifyContent: "center",
      alignItems: "center",
      width: fullWidth ? "100%" : "50%",
      minHeight: fullHeight ? "284px" : undefined,
      background: "#141414"
    }}>
          <img srcset={`${screenshotBase}/${example}-dark.png, ${screenshotBase}/${example}-dark-2x.png 2x`} src={`${screenshotBase}/${example}-dark.png`} alt={example} noZoom />
        </div>
      </Frame>;
  }
  if (screenshot) {
    return <Frame className="flex flex-col -mb-2">
        <div className="flex dark:hidden bg-white dark:bg-codeblock border border-gray-950/10 dark:border-white/10 dark:twoslash-dark rounded-2xl overflow-hidden" style={{
      justifyContent: "center",
      alignItems: "center",
      width: fullWidth ? "100%" : "50%",
      minHeight: fullHeight ? "284px" : undefined
    }}>
          <img srcset={`${screenshotBase}/${example}.png, ${screenshotBase}/${example}-2x.png 2x`} src={`${screenshotBase}/${example}.png`} alt={example} noZoom />
        </div>

        <div className="hidden dark:flex bg-white dark:bg-codeblock border border-gray-950/10 dark:border-white/10 dark:twoslash-dark rounded-2xl overflow-hidden" style={{
      background: "#141414",
      justifyContent: "center",
      alignItems: "center",
      width: fullWidth ? "100%" : "50%",
      minHeight: fullHeight ? "284px" : undefined
    }}>
          <img srcset={`${screenshotBase}/${example}-dark.png, ${screenshotBase}/${example}-dark-2x.png 2x`} src={`${screenshotBase}/${example}-dark.png`} alt={example} noZoom />
        </div>

        <div className="flex justify-end items-center text-xs py-2 px-1 gap-4">
          {!showCodeProp ? <button className="inline-flex justify-end items-center text-gray-700 dark:text-gray-50 hover:text-blue-500 dark:hover:text-blue-300 transition-colors group self-end gap-1 cursor-pointer" onClick={() => setShowCodeBlock(!showCodeBlock)} style={{
      appearance: "none"
    }}>
              <Icon icon="code" size="12px" className="group-hover:bg-blue-500 dark:group-hover:bg-blue-300" />
              <span>{showCodeBlock ? "Hide code" : "Show code"}</span>
            </button> : null}

          <a className="inline-flex justify-end items-center hover:text-blue-500 dark:hover:text-blue-300 transition-colors group self-end gap-1" href={`${STACKBLITZ_BASE}/${example}?file=src/App.tsx`} target="_blank" rel="noreferrer">
            <Icon icon="bolt" size="12px" className="group-hover:bg-blue-500 dark:group-hover:bg-blue-300" />
            <span>StackBlitz demo</span>
          </a>
        </div>

        <div className="grid transition-[grid-template-rows] duration-300 ease-in-out overflow-auto overflow-y-hidden overflow-x-auto" style={showCodeBlock ? {
      gridTemplateRows: "1fr"
    } : {
      gridTemplateRows: "0fr"
    }}>
          <div style={{
      minHeight: 0,
      overflowX: "auto",
      overflowY: "hidden",
      marginBlockStart: "-1.25rem",
      marginBlockEnd: "-1.5rem"
    }}>
            {children}
          </div>
        </div>
      </Frame>;
  } else {
    return <div style={{
      display: "flex",
      width: fullWidth ? "100%" : "50%",
      minHeight: customHeight ? customHeight : "316px",
      resize: "vertical",
      overflow: "auto"
    }}>
        <iframe title={example} style={{
      flex: 1,
      width: fullWidth ? "100%" : "50%",
      minHeight: customHeight ? customHeight : "316px"
    }} src={`${STACKBLITZ_BASE}/${example}?embed=1&hideNavigation=1&hideExplorer=1&terminalHeight=0&file=src/App.tsx${clickToLoad ? "&ctl=1" : ""}${hideCodeInLiveCode ? "&view=preview" : ""}`} allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" />
      </div>;
  }
};

Writing should be simple, direct, and consistent, avoiding jargon and unnecessary complexity. Inclusive language ensures that everyone feels represented and respected, while accessibility considerations make content usable for a diverse audience.

## Language for Best Practices

### Clarity and Simplicity

**Use Plain Language**: Write copy that’s easy to understand on the first read. Avoid complex words and jargon, and focus on simple, everyday language.

**Be Concise**: Keep sentences short and to the point. Ensure each word adds value and there is no unnecessary padding.

#### How to Use

<LiveCode example="languageandinclusivity-simple-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Update your profile.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-simple-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Proceed with the process to modify your profile settings.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

### Use Familiar Terms

**Avoid technical jargon**: Use familiar, everyday terms that resonate with the average user. If a term is necessary, provide simple explanations.

**Consistent terminology**: Stick to consistent terminology across all in-app elements to avoid confusion. Use the same words to describe the same features or actions throughout the app.

#### How to Use

<LiveCode example="languageandinclusivity-terms-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Log in to access your dashboard.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-terms-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Authenticate yourself to gain access to your control center.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

### Positive and Reassuring Tone

**Reinforce confidence**: Use a positive, friendly tone to make users feel in control. Avoid using language that makes them feel uncertain or stressed about the actions they’re taking.

#### How to Use

<LiveCode example="languageandinclusivity-tone-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Alert, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="4">
        <Alert
          title="You’ve successfully saved your settings."
          status="success"
          onClose={console.log}
        >
          Please continue to the next section.
        </Alert>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-tone-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Alert, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="4">
        <Alert
          title="Settings saved. We hope it worked."
          status="success"
          onClose={console.log}
        />
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

Use generic error messages that don’t help the user understand or resolve the issue.

## Inclusivity Best Practices

### Gender-neutral Language

**Avoid gendered pronouns**: Use gender-neutral pronouns like “they” instead of “he” or “she.” This ensures inclusivity and respects the diversity of your users.

**Neutral job titles and descriptions**: Use terms that don’t imply gender. For instance, use "salesperson" instead of "salesman."

#### How to Use

<LiveCode example="languageandinclusivity-neutral-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Enter your first and last name.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-neutral-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>First name (John), Last name (Smith).</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

Use vague terms like "Click Here" that don’t provide context.

### Accessibility Considerations

**Keep Copy Simple**: Ensure your copy is easy to understand by users with varying cognitive abilities or language proficiency. Use simple sentence structures and avoid long paragraphs.

**Ensure Readability**: Use familiar vocabulary and straightforward instructions. Write at an appropriate reading level, avoiding overly academic or complex phrases.

#### How to Use

<LiveCode example="languageandinclusivity-accessibility-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex, Link } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex justifyContent="space-around">
        <Text>
          You can find help <Link>here.</Link>
        </Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-accessibility-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex, Link } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex justifyContent="space-around">
        <Text>
          Assistance can be located via <Link>this portal</Link>.
        </Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

### Avoid Stereotypes and Bias

**Respect all genders, ages, and abilities**: Be mindful not to include language that reinforces stereotypes about gender, age, race, or abilities.

**Avoid assumptive language**: Refrain from assuming a user’s background, preferences, or level of experience.

### Inclusive Pronouns and Phrasing

**Use "They"**: When referring to a hypothetical user or person, always use "they" as a singular, gender-neutral pronoun. This ensures that you are addressing all genders inclusively.

**Use Inclusive Phrases**: Replace words and phrases that could exclude certain groups with more inclusive alternatives.

#### How to Use

<LiveCode example="languageandinclusivity-pronouns-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Each person is responsible for their own tasks.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-pronouns-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Each man is responsible for his own tasks.</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

## Disability Language

* In general, refer to the person first and the disability second—*People with disabilities* or *Customers who are deaf or hard-of-hearing*
* Emphasize accessibility over disability—Use *Accessible restroom*, not *Disabled restroom*
* Avoid euphemisms like *physically challenged*, *handi-capable*,or *special needs*

For more, see the [NCDJ Disability Language Style Guide](https://ncdj.org/style-guide/), [APA Style Guidelines on Disability](https://apastyle.apa.org/style-grammar-guidelines/bias-free-language/disability), and the [National Association for the Deaf FAQ](https://www.nad.org/resources/american-sign-language/community-and-culture-frequently-asked-questions/).

#### How to Use

<LiveCode example="languageandinclusivity-disability-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>People with disabilities</Text>
        <Text>People without disabilities</Text>
        <Text>Customers who are deaf or hard-of-hearing</Text>
        <Text>People with limited vision</Text>
        <Text>Person who is blind</Text>
        <Text>Accessibility parking</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-disability-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Handicapped people or The disabled</Text>
        <Text>Normal people, Regular people, or Able-bodied people</Text>
        <Text>Hearing impaired customers or Deaf customers</Text>
        <Text>The visually impaired</Text>
        <Text>Blind person or The blind</Text>
        <Text>Handicapped parking</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

## Colors and Screen Navigation

#### How to Use

When possible, avoid overly specific screen location instructions, which can be confusing for those with directional impairment.

<LiveCode example="languageandinclusivity-color-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Selected options are highlighted</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-color-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>Selected options are highlighted in blue</Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>

#### How to Use

When possible, avoid overly specific screen location instructions, which can be confusing for those with directional impairment.

<LiveCode example="languageandinclusivity-screen-do" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>
          At the bottom of the screen, click <b>Save</b>.
        </Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Check>**Do**</Check>

<LiveCode example="languageandinclusivity-screen-dont" screenshot fullWidth>
  ```tsx lines theme={null}
  import { Text, Flex } from "@servicetitan/anvil2";

  function App() {
    return (
      <Flex direction="column" gap="3">
        <Text>
          In the bottom right corner of the screen, click <b>Save</b>.
        </Text>
      </Flex>
    );
  }

  export default App;
  ```
</LiveCode>

<Danger>**Don't**</Danger>
