> ## 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.

# Decorative Icon

> Reference implementations for decorative icon lockups.

Decorative icons pair a rounded, tinted icon with text to add visual weight to a headline, card, or list row — without implying an action. Each example below is a starting point: copy it, then swap the icon and text for your use case.

## Resources

> [card] [Icon](https://anvil.servicetitan.com/docs/components/icon/web.md)
>
> Icon component anatomy, sizing, and usage guidance.

> [card] [Decorative icon](https://www.figma.com/design/9OB8FwOZZc079PBR6XY8vP/Anvil-Blocks?node-id=2189-16655)
>
> Figma reference implementations for decorative icon lockups.

## Interactive Card With Headline

Lead an interactive card with a decorative icon and a headline for a single, tappable entry point.

block-decorative-icon-interactive-card-headline

[StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/block-decorative-icon-interactive-card-headline?file=src/App.tsx)

```tsx lines theme={null}
import { Flex, Icon, Text, type Svg } from "@servicetitan/anvil2";
import { InteractiveCard } from "@servicetitan/anvil2/beta";
import Appointments from "@servicetitan/anvil2/assets/icons/st/appointments.svg";

type DecorativeIconSize = "small" | "medium" | "large" | "xlarge";

const decorativeIconCircleSize: Record<DecorativeIconSize, string> = {
  small: "var(--a2-size-6, 24px)",
  medium: "var(--a2-size-8, 32px)",
  large: "var(--a2-size-10, 40px)",
  xlarge: "var(--a2-size-12, 48px)",
};

function DecorativeIcon({
  svg,
  size = "medium",
}: {
  svg: Svg;
  size?: DecorativeIconSize;
}) {
  return (
    <Icon
      svg={svg}
      size={size}
      color="var(--a2-color-blue-700)"
      aria-hidden
      style={{
        alignItems: "center",
        background: "var(--a2-color-blue-100)",
        borderRadius: "50%",
        display: "inline-flex",
        flexShrink: 0,
        height: decorativeIconCircleSize[size],
        justifyContent: "center",
        width: decorativeIconCircleSize[size],
      }}
    />
  );
}

function App() {
  return (
    <InteractiveCard
      wrapperProps={{ "aria-label": "Appointments card" }}
      actionProps={{
        "aria-label": "Appointments",
        onClick: () => console.log("Appointments"),
      }}
      contentProps={{
        padding: "medium",
        style: { width: "min(446px, 100%)", boxSizing: "border-box" },
      }}
    >
      <Flex alignItems="center" gap={4}>
        <DecorativeIcon svg={Appointments} size="large" />
        <Text variant="headline" el="h3" size="small">
          Appointments
        </Text>
      </Flex>
    </InteractiveCard>
  );
}

export default App;
```

## In Interactive Cards

Differentiate a set of interactive cards, each with a decorative icon, title, and supporting text.

block-decorative-icon-in-interactive-cards

[StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/block-decorative-icon-in-interactive-cards?file=src/App.tsx)

```tsx lines theme={null}
import { Flex, Icon, Text, type Svg } from "@servicetitan/anvil2";
import { InteractiveCard } from "@servicetitan/anvil2/beta";
import FormatListBulleted from "@servicetitan/anvil2/assets/icons/material/round/format_list_bulleted.svg";
import CalendarMonth from "@servicetitan/anvil2/assets/icons/material/round/calendar_month.svg";

type DecorativeIconSize = "small" | "medium" | "large" | "xlarge";

const decorativeIconCircleSize: Record<DecorativeIconSize, string> = {
  small: "var(--a2-size-6, 24px)",
  medium: "var(--a2-size-8, 32px)",
  large: "var(--a2-size-10, 40px)",
  xlarge: "var(--a2-size-12, 48px)",
};

function DecorativeIcon({
  svg,
  size = "medium",
}: {
  svg: Svg;
  size?: DecorativeIconSize;
}) {
  return (
    <Icon
      svg={svg}
      size={size}
      color="var(--a2-color-blue-700)"
      aria-hidden
      style={{
        alignItems: "center",
        background: "var(--a2-color-blue-100)",
        borderRadius: "50%",
        display: "inline-flex",
        flexShrink: 0,
        height: decorativeIconCircleSize[size],
        justifyContent: "center",
        width: decorativeIconCircleSize[size],
      }}
    />
  );
}

const LOREM =
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius.";

const inCardsExamples: { icon: Svg; title: string; description: string }[] = [
  { icon: FormatListBulleted, title: "Create a list", description: LOREM },
  { icon: CalendarMonth, title: "Create a calendar", description: LOREM },
];

function App() {
  return (
    <Flex
      direction="column"
      alignItems="center"
      gap={4}
      style={{ width: "100%" }}
      md={{
        direction: "row",
        alignItems: "stretch",
        justifyContent: "center",
      }}
    >
      {inCardsExamples.map(({ icon, title, description }) => (
        <InteractiveCard
          key={title}
          wrapperProps={{
            "aria-label": `${title} card`,
            style: { width: "100%", maxWidth: 320 },
          }}
          actionProps={{
            "aria-label": title,
            onClick: () => console.log(title),
          }}
          contentProps={{
            padding: "medium",
            flexDirection: "column",
            gap: 4,
            style: { width: "100%" },
          }}
        >
          <DecorativeIcon svg={icon} size="large" />
          <Flex direction="column" gap={1}>
            <Text variant="headline" el="h3" size="small">
              {title}
            </Text>
            <Text variant="body" size="small" subdued>
              {description}
            </Text>
          </Flex>
        </InteractiveCard>
      ))}
    </Flex>
  );
}

export default App;
```

## Settings Page

Anchor each row of a settings or configuration list with a decorative icon, description, and action.

block-decorative-icon-settings-page

[StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/block-decorative-icon-settings-page?file=src/App.tsx)

```tsx lines theme={null}
import { Fragment } from "react";
import {
  Button,
  Card,
  Divider,
  Flex,
  Icon,
  Text,
  type Svg,
} from "@servicetitan/anvil2";
import AssignmentInd from "@servicetitan/anvil2/assets/icons/material/round/assignment_ind.svg";
import SyncAlt from "@servicetitan/anvil2/assets/icons/material/round/sync_alt.svg";
import Rule from "@servicetitan/anvil2/assets/icons/material/round/rule.svg";
import Cases from "@servicetitan/anvil2/assets/icons/material/round/cases.svg";
import ContactEmergency from "@servicetitan/anvil2/assets/icons/material/round/contact_emergency.svg";

type DecorativeIconSize = "small" | "medium" | "large" | "xlarge";

const decorativeIconCircleSize: Record<DecorativeIconSize, string> = {
  small: "var(--a2-size-6, 24px)",
  medium: "var(--a2-size-8, 32px)",
  large: "var(--a2-size-10, 40px)",
  xlarge: "var(--a2-size-12, 48px)",
};

function DecorativeIcon({
  svg,
  size = "medium",
}: {
  svg: Svg;
  size?: DecorativeIconSize;
}) {
  return (
    <Icon
      svg={svg}
      size={size}
      color="var(--a2-color-blue-700)"
      aria-hidden
      style={{
        alignItems: "center",
        background: "var(--a2-color-blue-100)",
        borderRadius: "50%",
        display: "inline-flex",
        flexShrink: 0,
        height: decorativeIconCircleSize[size],
        justifyContent: "center",
        width: decorativeIconCircleSize[size],
      }}
    />
  );
}

const settingsPageSections: {
  icon: Svg;
  title: string;
  description: string;
}[] = [
  {
    icon: AssignmentInd,
    title: "Persona",
    description:
      "Define your Voice Agent's brand identity and foundational knowledge to ensure a consistent and informed customer experience",
  },
  {
    icon: SyncAlt,
    title: "Conversation Flow",
    description:
      "Configure the interaction logic and specialized responses that guide your Voice Agent through various customer scenarios",
  },
  {
    icon: Rule,
    title: "Rules",
    description:
      "Define permissions for Voice Agent actions, such as booking jobs and processing payments",
  },
  {
    icon: Cases,
    title: "Job Types and Fees",
    description:
      "Manage job types, dispatch fees, and how fees are communicated to your customers",
  },
  {
    icon: ContactEmergency,
    title: "Escalations and Fallbacks",
    description:
      "Manage the transition from Voice Agent to human support to ensure every call reaches a resolution",
  },
];

function App() {
  return (
    <Card
      padding="0"
      flexDirection="column"
      style={{ width: "min(800px, 100%)", boxSizing: "border-box" }}
    >
      {settingsPageSections.map((section, index) => (
        <Fragment key={section.title}>
          {index > 0 && <Divider />}
          <div style={{ padding: 24 }}>
            <Flex
              justifyContent="space-between"
              alignItems="start"
              gap={4}
              md={{ alignItems: "center" }}
            >
              <Flex
                direction="column"
                alignItems="start"
                gap={4}
                style={{ flex: 1, minWidth: 0 }}
                md={{ direction: "row" }}
              >
                <DecorativeIcon svg={section.icon} size="large" />
                <Flex
                  direction="column"
                  gap={1}
                  style={{ flex: 1, minWidth: 0 }}
                >
                  <Text variant="headline" el="h2" size="small" noMargin>
                    {section.title}
                  </Text>
                  <Text subdued>{section.description}</Text>
                </Flex>
              </Flex>
              <Button
                appearance="secondary"
                aria-label={`Edit ${section.title}`}
                onClick={() => console.log(`Edit ${section.title}`)}
                style={{ flexShrink: 0 }}
              >
                Edit
              </Button>
            </Flex>
          </div>
        </Fragment>
      ))}
    </Card>
  );
}

export default App;
```

## Headline Lockups

Pair a decorative icon with a headline across sizes, from large headings down to labels.

block-decorative-icon-headline-lockups

[StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/block-decorative-icon-headline-lockups?file=src/App.tsx)

```tsx lines theme={null}
import { Flex, Icon, Text, type Svg } from "@servicetitan/anvil2";
import Face2 from "@servicetitan/anvil2/assets/icons/material/round/face_2.svg";

type DecorativeIconSize = "small" | "medium" | "large" | "xlarge";

const decorativeIconCircleSize: Record<DecorativeIconSize, string> = {
  small: "var(--a2-size-6, 24px)",
  medium: "var(--a2-size-8, 32px)",
  large: "var(--a2-size-10, 40px)",
  xlarge: "var(--a2-size-12, 48px)",
};

function DecorativeIcon({
  svg,
  size = "medium",
}: {
  svg: Svg;
  size?: DecorativeIconSize;
}) {
  return (
    <Icon
      svg={svg}
      size={size}
      color="var(--a2-color-blue-700)"
      aria-hidden
      style={{
        alignItems: "center",
        background: "var(--a2-color-blue-100)",
        borderRadius: "50%",
        display: "inline-flex",
        flexShrink: 0,
        height: decorativeIconCircleSize[size],
        justifyContent: "center",
        width: decorativeIconCircleSize[size],
      }}
    />
  );
}

type HeadlineLockup =
  | {
      decorativeSize: DecorativeIconSize;
      variant: "headline";
      el: "h1" | "h2" | "h3" | "h4";
      size: DecorativeIconSize;
      label: string;
    }
  | {
      decorativeSize: DecorativeIconSize;
      variant: "eyebrow";
      size: "medium";
      label: string;
    };

const headlineLockups: HeadlineLockup[] = [
  {
    decorativeSize: "xlarge",
    variant: "headline",
    el: "h1",
    size: "xlarge",
    label: "This is a headline!",
  },
  {
    decorativeSize: "large",
    variant: "headline",
    el: "h2",
    size: "large",
    label: "This is a headline!",
  },
  {
    decorativeSize: "medium",
    variant: "headline",
    el: "h3",
    size: "medium",
    label: "This is a headline!",
  },
  {
    decorativeSize: "small",
    variant: "headline",
    el: "h4",
    size: "small",
    label: "This is a headline!",
  },
  {
    decorativeSize: "small",
    variant: "eyebrow",
    size: "medium",
    label: "This is a label!",
  },
];

function App() {
  return (
    <Flex direction="column" gap={6} alignItems="start">
      {headlineLockups.map((lockup) => (
        <Flex
          key={`${lockup.variant}-${lockup.decorativeSize}-${lockup.label}`}
          alignItems="center"
          gap={4}
        >
          <DecorativeIcon svg={Face2} size={lockup.decorativeSize} />
          {lockup.variant === "headline" ? (
            <Text variant="headline" el={lockup.el} size={lockup.size}>
              {lockup.label}
            </Text>
          ) : (
            <Text variant="eyebrow" size={lockup.size}>
              {lockup.label}
            </Text>
          )}
        </Flex>
      ))}
    </Flex>
  );
}

export default App;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.