---
title: "Autocomplete · UI SDK — StyleX Blocks"
description: "Free-text input with filtered suggestions; the typed text is the value, suggestions just fill it in."
url: "https://stylexblocks.com/components/ui-sdk/autocomplete/"
agent:
  instructions: "Use this search API to find relevant components and blocks across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://stylexblocks.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Autocomplete

Free-text input with filtered suggestions; the typed text is the value, suggestions just fill it in.

- Behavior engine: UI SDK
- Also available for: [Ark UI](https://stylexblocks.com/components/ark-ui/autocomplete.md), [Base UI](https://stylexblocks.com/components/base-ui/autocomplete.md)
- Category: Form
- Variants: outline, subtle, flushed
- Sizes: xs, sm, md, lg
- Used in blocks: [Settings Form](https://stylexblocks.com/block/ui-sdk/settings-form.md)
- HTML page: https://stylexblocks.com/components/ui-sdk/autocomplete/

## Install

Configure the project once (sets the behavior engine and import aliases):

```sh
npx stylexblocks init --style ui-sdk
```

Then add the item as source you own:

```sh
npx stylexblocks add autocomplete
```

Equivalent: `npx shadcn add @stylexblocks/autocomplete`. Registry item JSON: https://stylexblocks.com/r/ui-sdk/autocomplete.json

## Usage

```tsx
import { Autocomplete } from "#components/ui/ui-sdk/autocomplete.tsx";

const tags = ["accessibility", "animation", "api", "caching", "css", "react"];

export function Example() {
  return (
    // UI SDK's Autocomplete: the typed text is the value, and typing
    // filters the rendered suggestions by their text
    <Autocomplete.Root variant="outline" size="md">
      <Autocomplete.Label>Topic</Autocomplete.Label>
      <Autocomplete.Control>
        <Autocomplete.Input placeholder="e.g. react" />
        <Autocomplete.IndicatorGroup>
          <Autocomplete.Clear />
        </Autocomplete.IndicatorGroup>
      </Autocomplete.Control>
      {/* Content opens in the browser's top layer, anchored to the input */}
      <Autocomplete.Content>
        <Autocomplete.List>
          {tags.map((tag) => (
            <Autocomplete.Item key={tag} value={tag}>
              <Autocomplete.ItemText>{tag}</Autocomplete.ItemText>
            </Autocomplete.Item>
          ))}
        </Autocomplete.List>
      </Autocomplete.Content>
    </Autocomplete.Root>
  );
}

// controlled: <Autocomplete.Root value={text} onValueChange={(value) => setText(value)}>
// inline completion: <Autocomplete.Root inlineComplete>
// fuzzy matching: <Autocomplete.Root filter="fuzzy">
```

## Examples

### Free text value

Any text is a valid value: type something that isn't suggested, or pick a suggestion to fill the input.

```tsx
const [value, setValue] = useState("");

<Autocomplete.Root value={value} onValueChange={(value) => setValue(value)}>
  {/* ... */}
</Autocomplete.Root>
```

## Source

`components/ui/ui-sdk/autocomplete.tsx`

```tsx
import * as stylex from "@stylexjs/stylex";
import {
  Autocomplete as UiSdkAutocomplete,
  AutocompleteClear,
  AutocompleteContent,
  AutocompleteEmpty,
  AutocompleteGroup,
  AutocompleteGroupLabel,
  AutocompleteInput,
  AutocompleteItem,
  AutocompleteItemText,
  type AutocompleteItemTextState,
  AutocompleteLabel,
  AutocompleteList,
  AutocompleteStatus,
  AutocompleteTrigger,
  type AutocompleteProps,
} from "@ui-sdk/react/autocomplete";
import { createSlotRecipeContext } from "#lib/ui-sdk/create-slot-recipe-context.tsx";
import {
  defineSlotRecipe,
  resolveSlotStyles,
  type SlotRecipeVariants,
  type StyleOverrideProps,
} from "#lib/recipe-props.ts";
import { semanticShadows } from "@stylexblocks/ui/semantic-tokens/shadows.stylex.ts";
import {
  comboboxIndicatorGroupIconVars,
  comboboxItemIconVars,
} from '@stylexblocks/ui/slot-recipes/combobox.stylex.ts'

import { colorPalette } from '@stylexblocks/ui/color-palette.stylex.ts'
import { cursor } from '@stylexblocks/ui/tokens/cursor.stylex.ts'
import { durations } from '@stylexblocks/ui/tokens/durations.stylex.ts'
import { fontSizes } from '@stylexblocks/ui/tokens/font-sizes.stylex.ts'
import { fontWeights } from '@stylexblocks/ui/tokens/font-weights.stylex.ts'
import { lineHeights } from '@stylexblocks/ui/tokens/line-heights.stylex.ts'
import { radii } from '@stylexblocks/ui/tokens/radii.stylex.ts'
import { semanticColors } from '@stylexblocks/ui/semantic-tokens/colors.stylex.ts'
import { semanticRadii } from '@stylexblocks/ui/semantic-tokens/radii.stylex.ts'
import { sizes } from '@stylexblocks/ui/tokens/sizes.stylex.ts'
import { spacing } from '@stylexblocks/ui/tokens/spacing.stylex.ts'
import { zIndices } from '@stylexblocks/ui/tokens/z-indices.stylex.ts'


const comboboxRoot = stylex.create({
  base: {
    display: 'flex',
    flexDirection: 'column',
    gap: spacing._1_5,
    width: sizes.full,
  },
})

const comboboxRootSizes = stylex.create({
  xs: {
    '--combobox-input-height': sizes.controlXs,
    '--combobox-input-padding-x': spacing._2,
    '--combobox-indicator-size': sizes._3_5,
  },
  sm: {
    '--combobox-input-height': sizes.controlSm,
    '--combobox-input-padding-x': spacing._2_5,
    '--combobox-indicator-size': sizes._4,
  },
  md: {
    '--combobox-input-height': sizes.controlMd,
    '--combobox-input-padding-x': spacing._3,
    '--combobox-indicator-size': sizes._4,
  },
  lg: {
    '--combobox-input-height': sizes.controlLg,
    '--combobox-input-padding-x': spacing._4,
    '--combobox-indicator-size': sizes._5,
  },
})

const comboboxLabel = stylex.create({
  base: {
    fontWeight: fontWeights.medium,
    userSelect: 'none',
    fontSize: fontSizes.sm,
    lineHeight: lineHeights.sm,
    opacity: {
      default: null,
      ':is(:disabled, [disabled], [data-disabled])': 0.5,
    },
    cursor: {
      default: null,
      ':is(:disabled, [disabled], [data-disabled])': 'not-allowed',
    },
  },
})

const comboboxInput = stylex.create({
  base: {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'space-between',
    width: sizes.full,
    minHeight: 'var(--combobox-input-height)',
    paddingInline: 'var(--combobox-input-padding-x)',
    '--input-height': 'var(--combobox-input-height)',
    borderRadius: semanticRadii.control,
    outline: 'none',
    userSelect: 'none',
    textAlign: 'start',
    opacity: {
      default: null,
      ':is(:disabled, [disabled], [data-disabled])': 0.5,
    },
    cursor: {
      default: null,
      ':is(:disabled, [disabled], [data-disabled])': 'not-allowed',
    },
    '--focus-color': colorPalette.focusRing,
    '--error-color': semanticColors.borderError,
    '--focus-ring-color': {
      default: null,
      ':is([data-invalid], [aria-invalid="true"])': 'var(--error-color)',
    },
    borderColor: {
      default: null,
      ':is([data-invalid], [aria-invalid="true"])': 'var(--error-color)',
    },
  },
})

const comboboxInputSizes = stylex.create({
  xs: {
    fontSize: fontSizes.xs,
    lineHeight: lineHeights.xs,
  },
  sm: {
    fontSize: fontSizes.sm,
    lineHeight: lineHeights.sm,
  },
  md: {
    fontSize: fontSizes.sm,
    lineHeight: lineHeights.sm,
  },
  lg: {
    fontSize: fontSizes.md,
    lineHeight: lineHeights.md,
  },
})

const comboboxInputVariants = stylex.create({
  outline: {
    backgroundColor: semanticColors.bg,
    borderWidth: '1px',
    borderColor: {
      default: semanticColors.border,
      ':is([data-invalid], [aria-invalid="true"])': 'var(--error-color)',
    },
    outlineWidth: {
      default: null,
      ':focus-visible': 'var(--focus-ring-width, 0)',
    },
    outlineOffset: {
      default: null,
      ':focus-visible': '0px',
    },
    outlineStyle: {
      default: null,
      ':focus-visible': 'solid',
    },
    outlineColor: {
      default: null,
      ':focus-visible': colorPalette.focusRing,
    },
  },
  subtle: {
    borderWidth: '1px',
    borderColor: {
      default: 'transparent',
      ':is([data-invalid], [aria-invalid="true"])': 'var(--error-color)',
    },
    backgroundColor: semanticColors.bgMuted,
    outlineWidth: {
      default: null,
      ':focus-visible': 'var(--focus-ring-width, 0)',
    },
    outlineOffset: {
      default: null,
      ':focus-visible': '0px',
    },
    outlineStyle: {
      default: null,
      ':focus-visible': 'solid',
    },
    outlineColor: {
      default: null,
      ':focus-visible': colorPalette.focusRing,
    },
  },
  flushed: {
    backgroundColor: 'transparent',
    borderBottomWidth: '1px',
    borderBottomColor: semanticColors.border,
    borderRadius: 0,
    paddingInline: 0,
    borderColor: {
      default: null,
      ':is([data-invalid], [aria-invalid="true"])': 'var(--error-color)',
      ':focus-visible': 'var(--focus-color)',
    },
    boxShadow: {
      default: null,
      ':focus-visible': '0px 1px 0px 0px var(--focus-color)',
    },
  },
})

const comboboxTrigger = stylex.create({
  base: {
    display: 'inline-flex',
    alignItems: 'center',
    justifyContent: 'center',
    pointerEvents: 'auto',
    '--input-height': 'var(--combobox-input-height)',
  },
})

const comboboxTriggerSizes = stylex.create({
  xs: {
    fontSize: fontSizes.xs,
    lineHeight: lineHeights.xs,
    gap: spacing._1,
  },
  sm: {
    fontSize: fontSizes.xs,
    lineHeight: lineHeights.xs,
    gap: spacing._1,
  },
  md: {
    fontSize: fontSizes.sm,
    lineHeight: lineHeights.sm,
    gap: spacing._2,
  },
  lg: {
    fontSize: fontSizes.md,
    lineHeight: lineHeights.md,
    paddingBlock: spacing._3,
    gap: spacing._2,
  },
})

const comboboxClearTrigger = stylex.create({
  base: {
    color: semanticColors.fgMuted,
    pointerEvents: 'auto',
    outlineWidth: {
      default: null,
      ':focus-visible': 'var(--focus-ring-width, 0)',
    },
    outlineOffset: {
      default: null,
      ':focus-visible': '0px',
    },
    outlineStyle: {
      default: null,
      ':focus-visible': 'solid',
    },
    outlineColor: {
      default: null,
      ':focus-visible': colorPalette.focusRing,
    },
    focusRingWidth: '2px',
    borderRadius: semanticRadii.control,
  },
})

const comboboxControl = stylex.create({
  base: {
    position: 'relative',
  },
})

const comboboxIndicatorGroup = stylex.create({
  base: {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    gap: spacing._1,
    position: 'absolute',
    insetInlineEnd: 0,
    top: 0,
    bottom: 0,
    pointerEvents: 'none',
    paddingInline: 'var(--combobox-input-padding-x)',
    [comboboxIndicatorGroupIconVars.width]: 'var(--combobox-indicator-size)',
    [comboboxIndicatorGroupIconVars.height]: 'var(--combobox-indicator-size)',
  },
})

const comboboxIndicatorGroupVariants = stylex.create({
  flushed: {
    paddingInline: 0,
  },
})

const comboboxIndicatorGroupIcon = stylex.create({
  base: {
    width: comboboxIndicatorGroupIconVars.width,
    height: comboboxIndicatorGroupIconVars.height,
  },
})

const comboboxContent = stylex.create({
  base: {
    display: 'flex',
    flexDirection: 'column',
    '--menu-z-index': zIndices.layer3,
    zIndex: 'calc(var(--menu-z-index) + var(--layer-index, 0))',
    outline: 'none',
    maxHeight: 'var(--available-height)',
    overflowY: 'auto',
    animationName: {
      default: null,
      ':is([data-open], [data-state="open"])': 'fade-in, slide-from-top',
      ':is([data-closed], [data-state="closed"])': 'fade-out',
    },
    animationDuration: {
      default: null,
      ':is([data-open], [data-state="open"])': durations.fast,
      ':is([data-closed], [data-state="closed"])': durations.faster,
    },
  },
})

const comboboxContentSizes = stylex.create({
  xs: {
    '--combobox-item-padding-x': spacing._1,
    '--combobox-item-padding-y': spacing._0_5,
    '--combobox-indicator-size': sizes._3_5,
    borderRadius: semanticRadii.panel,
    padding: spacing._0_5,
    fontSize: fontSizes.xs,
    lineHeight: lineHeights.xs,
  },
  sm: {
    '--combobox-item-padding-x': spacing._1_5,
    '--combobox-item-padding-y': spacing._1,
    '--combobox-indicator-size': sizes._4,
    borderRadius: semanticRadii.panel,
    padding: spacing._1,
    fontSize: fontSizes.xs,
    lineHeight: lineHeights.xs,
  },
  md: {
    '--combobox-item-padding-x': spacing._2,
    '--combobox-item-padding-y': spacing._1_5,
    '--combobox-indicator-size': sizes._4,
    borderRadius: semanticRadii.panel,
    padding: spacing._1,
    fontSize: fontSizes.sm,
    lineHeight: lineHeights.sm,
  },
  lg: {
    '--combobox-item-padding-y': spacing._2,
    '--combobox-item-padding-x': spacing._3,
    '--combobox-indicator-size': sizes._5,
    borderRadius: semanticRadii.panel,
    padding: spacing._1,
    fontSize: fontSizes.md,
    lineHeight: lineHeights.md,
  },
})

const comboboxItem = stylex.create({
  base: {
    position: 'relative',
    userSelect: 'none',
    display: 'flex',
    alignItems: 'center',
    gap: spacing._2,
    paddingBlock: 'var(--combobox-item-padding-y)',
    paddingInline: 'var(--combobox-item-padding-x)',
    cursor: cursor.option,
    justifyContent: 'space-between',
    flex: 1,
    textAlign: 'start',
    borderRadius: semanticRadii.control,
    pointerEvents: {
      default: null,
      ':is(:disabled, [disabled], [data-disabled])': 'none',
    },
    opacity: {
      default: null,
      ':is(:disabled, [disabled], [data-disabled])': 0.5,
    },
    [comboboxItemIconVars.width]: 'var(--combobox-indicator-size)',
    [comboboxItemIconVars.height]: 'var(--combobox-indicator-size)',
  },
})

const comboboxItemSizes = stylex.create({
  xs: {
    borderRadius: `max(0px, calc(${semanticRadii.panel} - ${sizes._0_5}))`,
  },
  sm: {
    borderRadius: `max(0px, calc(${semanticRadii.panel} - ${sizes._0_5}))`,
  },
  md: {
    borderRadius: `max(0px, calc(${semanticRadii.panel} - ${sizes._1}))`,
  },
  lg: {
    borderRadius: `max(0px, calc(${semanticRadii.panel} - ${sizes._1}))`,
  },
})

const comboboxItemIcon = stylex.create({
  base: {
    width: comboboxItemIconVars.width,
    height: comboboxItemIconVars.height,
  },
})

const comboboxEmpty = stylex.create({
  base: {
    paddingBlock: 'var(--combobox-item-padding-y)',
    paddingInline: 'var(--combobox-item-padding-x)',
  },
})

const comboboxItemText = stylex.create({
  base: {
    flex: 1,
  },
})

const comboboxItemGroup = stylex.create({
  base: {
    paddingBottom: {
      default: 'var(--combobox-item-padding-y)',
      ':last-child': 0,
    },
  },
})

const comboboxItemGroupLabel = stylex.create({
  base: {
    fontWeight: fontWeights.medium,
    paddingBlock: 'var(--combobox-item-padding-y)',
    paddingInline: 'var(--combobox-item-padding-x)',
  },
})

const comboboxItemIndicator = stylex.create({
  base: {},
})

const comboboxItemIndicatorSizes = stylex.create({
  md: {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
  },
})

export type ComboboxVariant = keyof typeof comboboxInputVariants

export type ComboboxSize = keyof typeof comboboxRootSizes

// An autocomplete is a combobox without a selection: reuse its recipe.
const autocompleteRecipe = defineSlotRecipe({
  slots: {
    root: { styles: comboboxRoot, sizes: comboboxRootSizes },
    label: { styles: comboboxLabel },
    input: {
      styles: comboboxInput,
      sizes: comboboxInputSizes,
      variants: comboboxInputVariants,
    },
    clearTrigger: { styles: comboboxClearTrigger },
    control: { styles: comboboxControl },
    indicatorGroup: {
      styles: comboboxIndicatorGroup,
      variants: comboboxIndicatorGroupVariants,
    },
    content: { styles: comboboxContent, sizes: comboboxContentSizes },
    item: { styles: comboboxItem, sizes: comboboxItemSizes },
    empty: { styles: comboboxEmpty },
    itemText: { styles: comboboxItemText },
    itemGroup: { styles: comboboxItemGroup },
    itemGroupLabel: { styles: comboboxItemGroupLabel },
  },
  defaultVariants: { size: "md", variant: "outline" },
});

// chrome the generated recipe leaves to the composition layer: the reset
// clear button, room for it inside the input, the popup surface, and the
// highlighted-suggestion feedback (pointer and keyboard both highlight).
// UI SDK's Content is a top-layer popover that keeps the browser's own
// popover border, so the panel clears it and only lays out while open.
const chrome = stylex.create({
  btnReset: {
    appearance: "none",
    display: "inline-flex",
    alignItems: "center",
    justifyContent: "center",
    backgroundColor: "transparent",
    borderWidth: 0,
    borderStyle: "none",
    padding: 0,
    margin: 0,
    color: {
      default: semanticColors.fgMuted,
      ":hover": semanticColors.fg,
    },
    cursor: "pointer",
    // the indicator group ignores the pointer; its buttons opt back in
    pointerEvents: "auto",
  },
  input: {
    paddingInlineEnd:
      "calc(var(--combobox-indicator-size) + var(--combobox-input-padding-x) * 2)",
  },
  panel: {
    display: {
      default: null,
      ":popover-open": "flex",
    },
    borderWidth: 0,
    borderStyle: "none",
    color: "inherit",
    backgroundColor: semanticColors.bgPanel,
    boxShadow: semanticShadows.overlay,
    minWidth: "var(--anchor-width)",
  },
  item: {
    backgroundColor: {
      default: null,
      ":hover": semanticColors.bgMuted,
      "[data-highlighted]": semanticColors.bgMuted,
    },
    outline: "none",
  },
  // Empty renders only while no suggestion matches
  empty: {
    display: {
      default: null,
      ":empty": "none",
    },
  },
});

function XIcon(props: React.ComponentProps<"svg">) {
  return (
    <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" {...props}>
      <path d="m4.5 4.5 7 7m0-7-7 7" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
    </svg>
  );
}

function ChevronDownIcon(props: React.ComponentProps<"svg">) {
  return (
    <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" {...props}>
      <path d="m4 6 4 4 4-4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  );
}

const { withProvider, withContext } = createSlotRecipeContext(autocompleteRecipe);

type AutocompleteVariants = SlotRecipeVariants<typeof autocompleteRecipe>;

function RootNode(
  props: AutocompleteProps & { className?: string; style?: React.CSSProperties },
) {
  const { className, style, children, ...rest } = props;
  return (
    <div className={className} style={style}>
      <UiSdkAutocomplete {...rest}>{children}</UiSdkAutocomplete>
    </div>
  );
}

const StyledRoot = withProvider(RootNode, "root", "AutocompleteRoot");

/**
 * Autocomplete — UI SDK's autocomplete parts wearing the combobox recipe.
 * The typed text is the value (`value`, `defaultValue`, `onValueChange`);
 * suggestions only fill the input. Typing filters the rendered Items by
 * their text (`filter` switches to `"startsWith"`, `"fuzzy"` or a
 * function); `inlineComplete` completes the text in place. `<Autocomplete.Root
 * variant size>` renders the recipe's root layout element around UI SDK's
 * context-only Autocomplete, and every part inherits the variants through
 * context. Content opens in the browser's top layer anchored to the input,
 * so there is no Portal or Positioner part. Composition per part via `render`.
 */
export type AutocompleteRootProps = AutocompleteProps &
  Partial<AutocompleteVariants> &
  StyleOverrideProps & { className?: string };

function Root(props: AutocompleteRootProps) {
  return <StyledRoot {...(props as React.ComponentProps<typeof StyledRoot>)} />;
}
Root.displayName = "AutocompleteRoot";

const StyledClear = withContext(
  AutocompleteClear,
  (v) => [...resolveSlotStyles(autocompleteRecipe.slots.clearTrigger, v), chrome.btnReset],
  "AutocompleteClear",
);

function Clear({ children, ...rest }: React.ComponentProps<typeof StyledClear>) {
  return (
    <StyledClear aria-label="Clear" {...rest}>
      {children ?? <XIcon {...stylex.props(comboboxIndicatorGroupIcon.base)} />}
    </StyledClear>
  );
}
Clear.displayName = "AutocompleteClear";

const StyledTrigger = withContext(
  AutocompleteTrigger,
  (v) => [...resolveSlotStyles(autocompleteRecipe.slots.clearTrigger, v), chrome.btnReset],
  "AutocompleteTrigger",
);

function Trigger({ children, ...rest }: React.ComponentProps<typeof StyledTrigger>) {
  return (
    <StyledTrigger aria-label="Show suggestions" {...rest}>
      {children ?? <ChevronDownIcon {...stylex.props(comboboxIndicatorGroupIcon.base)} />}
    </StyledTrigger>
  );
}
Trigger.displayName = "AutocompleteTrigger";

const StyledContent = withContext(
  AutocompleteContent,
  (v) => [...resolveSlotStyles(autocompleteRecipe.slots.content, v), chrome.panel],
  "AutocompleteContent",
);

function Content(props: React.ComponentProps<typeof StyledContent>) {
  return <StyledContent sideOffset={4} {...props} />;
}
Content.displayName = "AutocompleteContent";

// typed-text matches are marked by UI SDK with a <mark>; draw them as
// emphasis instead of the browser's yellow highlighter
const matchMark = stylex.create({
  base: { backgroundColor: "transparent", color: "inherit", fontWeight: 600 },
});

const StyledItemText = withContext(AutocompleteItemText, "itemText", "AutocompleteItemText");

/**
 * ItemText — the item's label with the typed text marked. Plain-text
 * children (or none: the item's label) are marked; other children render
 * as given.
 */
function ItemText(props: React.ComponentProps<typeof StyledItemText>) {
  const { children, ...rest } = props;
  if (children != null && typeof children !== "string") {
    return <StyledItemText {...rest}>{children}</StyledItemText>;
  }
  return (
    <StyledItemText {...rest}>
      {(state: AutocompleteItemTextState) =>
        state.segments.map((segment, i) =>
          segment.match ? (
            <mark key={i} {...stylex.props(matchMark.base)}>
              {segment.text}
            </mark>
          ) : (
            segment.text
          ),
        )
      }
    </StyledItemText>
  );
}
ItemText.displayName = "AutocompleteItemText";

export const Autocomplete = {
  Root,
  // a native label tied to the input
  Label: withContext(AutocompleteLabel, "label", "AutocompleteLabel"),
  Control: withContext("div", "control", "AutocompleteControl"),
  Input: withContext(
    AutocompleteInput,
    (v) => [...resolveSlotStyles(autocompleteRecipe.slots.input, v), chrome.input],
    "AutocompleteInput",
  ),
  /** End-of-input slot for the clear button (or your own adornments). */
  IndicatorGroup: withContext("div", "indicatorGroup", "AutocompleteIndicatorGroup"),
  /** Clears the text; only mounted while the input has text. Ships an × icon. */
  Clear,
  /** Optional button that opens the suggestions without typing. Ships a chevron. */
  Trigger,
  Content,
  List: AutocompleteList,
  Item: withContext(
    AutocompleteItem,
    (v) => [...resolveSlotStyles(autocompleteRecipe.slots.item, v), chrome.item],
    "AutocompleteItem",
  ),
  ItemText,
  Empty: withContext(
    AutocompleteEmpty,
    (v) => [...resolveSlotStyles(autocompleteRecipe.slots.empty, v), chrome.empty],
    "AutocompleteEmpty",
  ),
  Group: withContext(AutocompleteGroup, "itemGroup", "AutocompleteGroup"),
  GroupLabel: withContext(
    AutocompleteGroupLabel,
    "itemGroupLabel",
    "AutocompleteGroupLabel",
  ),
  Status: AutocompleteStatus,
};
```
