# Animated Autocomplete for UI SDK (/docs/components/autocomplete)

Suggestions cascade in under the field and one highlight glides between them as you type.

```tsx title="example.tsx"
import {
  Autocomplete,
  AutocompleteClear,
  AutocompleteContent,
  AutocompleteControl,
  AutocompleteEmpty,
  AutocompleteGroup,
  AutocompleteGroupLabel,
  AutocompleteInput,
  AutocompleteItem,
  AutocompleteItemIcon,
  AutocompleteItemText,
  AutocompleteLabel,
  AutocompleteList,
} from "@/components/keyframery/autocomplete"

/* The demo plays itself: typing unfolds the suggestions, which cascade in; the highlight glides;
   one is chosen; then another search. */
const item = (n: number) => `[data-slot="autocomplete-item"]:nth-of-type(${n})`
const field = '[data-slot="autocomplete-input"]'

const minutes: Record<string, number> = {
  "Lemon garlic pasta": 20,
  "Shakshuka with feta": 25,
  "Miso glazed salmon": 30,
  "Mushroom risotto": 40,
  "Chicken tikka masala": 45,
  "Thai green curry": 35,
  "Banana bread": 70,
  "Lentil soup with cumin": 35,
  "Pad thai": 25,
  "Chocolate chip cookies": 30,
  "Greek salad": 10,
  "Pancakes with blueberries": 20,
}

const recipes = Object.keys(minutes)
const recent = ["Mushroom risotto", "Thai green curry", "Banana bread"]
const recentGroup = [{ type: "group" as const, label: "Recently cooked", items: recent }]

type Entry = string | (typeof recentGroup)[number]

function ClockIcon() {
  return (
    <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <circle cx="8" cy="8" r="5.75" />
      <path d="M8 5v3l2 1.25" />
    </svg>
  )
}

function SearchIcon() {
  return (
    <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <circle cx="7" cy="7" r="4.25" />
      <path d="m10.25 10.25 3 3" />
    </svg>
  )
}

function Recipe({ name, recentRow }: { name: string; recentRow?: boolean }) {
  return (
    <AutocompleteItem value={name}>
      <AutocompleteItemIcon>{recentRow ? <ClockIcon /> : <SearchIcon />}</AutocompleteItemIcon>
      <AutocompleteItemText />
      <span className="shrink-0 text-[12px] text-muted-foreground tabular-nums">{minutes[name]} min</span>
    </AutocompleteItem>
  )
}

export default function AutocompleteDemo() {
  return (
    <div className="flex w-[340px] flex-col gap-2">
      <Autocomplete items={recipes} emptyItems={recentGroup} openOnFocus autoHighlight>
        <AutocompleteLabel>Find a recipe</AutocompleteLabel>
        <AutocompleteControl>
          <SearchIcon />
          <AutocompleteInput type="search" placeholder="Pasta, curry, something sweet…" />
          <AutocompleteClear aria-label="Clear search" />
        </AutocompleteControl>
        <AutocompleteContent>
          <AutocompleteEmpty>No recipes match. Press Enter to search anyway.</AutocompleteEmpty>
          <AutocompleteList>
            {(state) =>
              (state.items as Entry[]).map((entry) =>
                typeof entry === "string" ? (
                  <Recipe key={entry} name={entry} />
                ) : (
                  <AutocompleteGroup key={entry.label}>
                    <AutocompleteGroupLabel>{entry.label}</AutocompleteGroupLabel>
                    {entry.items.map((name) => (
                      <Recipe key={name} name={name} recentRow />
                    ))}
                  </AutocompleteGroup>
                ),
              )
            }
          </AutocompleteList>
        </AutocompleteContent>
      </Autocomplete>
    </div>
  )
}
```

## Installation [#installation]

```bash
npx shadcn@latest add @keyframery/autocomplete
```

This adds `components/keyframery/autocomplete.tsx` and its primitive, `components/keyframery/primitives/autocomplete.tsx`, to your project, and installs `@ui-sdk/react`. The motion tokens are added to your global CSS the first time you install a component.

## Usage [#usage]

```tsx
import {
  Autocomplete,
  AutocompleteArrow,
  AutocompleteClear,
  AutocompleteContent,
  AutocompleteControl,
  AutocompleteEmpty,
  AutocompleteGroup,
  AutocompleteGroupLabel,
  AutocompleteInput,
  AutocompleteItem,
  AutocompleteItemIcon,
  AutocompleteItems,
  AutocompleteItemText,
  AutocompleteLabel,
  AutocompleteList,
  AutocompleteSeparator,
  AutocompleteStatus,
  AutocompleteTrigger,
} from "@/components/keyframery/autocomplete"
```

The parts and props are the same as UI SDK's Autocomplete. For every prop, see the [UI SDK autocomplete reference](https://ui-sdk.dev/docs/components/autocomplete).

## What moves [#what-moves]

| Move        | What you see                                               |
| ----------- | ---------------------------------------------------------- |
| **Unfold**  | Suggestions unfold from the field.                         |
| **Cascade** | Rows arrive one after another.                             |
| **Glide**   | One highlight glides between suggestions as you move.      |
| **Pop**     | The clear button pops in once there is something to clear. |

Timing and springiness follow the [motion style](/docs/motion-styles) you set, so this component moves like the rest of your app.

## Swap the import [#swap-the-import]

Already using UI SDK's autocomplete with your own styles? Keep your markup and change one line. The primitive adds motion and nothing else.

```tsx
// Before
import { … } from "@ui-sdk/react/autocomplete"

// After: same parts, same props, now animated
import { … } from "@/components/keyframery/primitives/autocomplete"
```

## Parts [#parts]

The finished component exports 18 parts:

`Autocomplete`, `AutocompleteArrow`, `AutocompleteClear`, `AutocompleteContent`, `AutocompleteControl`, `AutocompleteEmpty`, `AutocompleteGroup`, `AutocompleteGroupLabel`, `AutocompleteInput`, `AutocompleteItem`, `AutocompleteItemIcon`, `AutocompleteItems`, `AutocompleteItemText`, `AutocompleteLabel`, `AutocompleteList`, `AutocompleteSeparator`, `AutocompleteStatus`, `AutocompleteTrigger`

## Accessibility [#accessibility]

Keyboard, focus and screen-reader behaviour come from UI SDK and are not changed. With reduced motion turned on, nothing in the autocomplete moves: changes happen at once or with a short fade. More in [Accessibility](/docs/accessibility).

## Source [#source]

The code that lands in your project. It is yours to change.

**components/keyframery/autocomplete.tsx**

```tsx
"use client"

/* Styled autocomplete: the animated primitive plus the Keyframery look. */

import {
  Autocomplete as AutocompleteRoot,
  AutocompleteArrow as AutocompleteArrowPart,
  AutocompleteClear as AutocompleteClearPart,
  AutocompleteContent as AutocompleteContentPart,
  AutocompleteEmpty as AutocompleteEmptyPart,
  AutocompleteGroup as AutocompleteGroupPart,
  AutocompleteGroupLabel as AutocompleteGroupLabelPart,
  AutocompleteInput as AutocompleteInputPart,
  AutocompleteItem as AutocompleteItemPart,
  AutocompleteItemIcon as AutocompleteItemIconPart,
  AutocompleteItemText as AutocompleteItemTextPart,
  AutocompleteLabel as AutocompleteLabelPart,
  AutocompleteList as AutocompleteListPart,
  AutocompleteSeparator as AutocompleteSeparatorPart,
  AutocompleteStatus as AutocompleteStatusPart,
  AutocompleteTrigger as AutocompleteTriggerPart,
  createAutocompleteController,
  type ListData,
} from "@/components/keyframery/primitives/autocomplete"
import * as React from "react"

import { cn } from "@/lib/utils"

function ChevronIcon() {
  return (
    <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="m4 6 4 4 4-4" />
    </svg>
  )
}

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

/* Renders no element of its own. */
function Autocomplete(props: React.ComponentProps<typeof AutocompleteRoot>) {
  return <AutocompleteRoot {...props} />
}

function AutocompleteLabel({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteLabelPart>) {
  return (
    <AutocompleteLabelPart
      className={cn(
        "text-[13px] leading-none font-medium text-foreground data-disabled:opacity-50",
        className,
      )}
      {...props}
    />
  )
}

/* The row that holds the input, with the clear button and the trigger laid over its right
   edge. A leading svg sits over its left edge. */
function AutocompleteControl({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="autocomplete-control"
      className={cn(
        "group/control relative flex w-full items-center",
        "[&>svg]:pointer-events-none [&>svg]:absolute [&>svg]:top-2.5 [&>svg]:left-3 [&>svg]:size-4 [&>svg]:text-muted-foreground",
        "[&>svg]:transition-colors [&>svg]:duration-[calc(150ms*var(--kf-speed,1))] has-[input:focus-visible]:[&>svg]:text-foreground motion-reduce:[&>svg]:transition-none",
        className,
      )}
      {...props}
    />
  )
}

function AutocompleteInput({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteInputPart>) {
  return (
    <AutocompleteInputPart
      className={cn(
        "h-9 w-full min-w-0 rounded-[10px] bg-background px-3 text-[13px] text-foreground outline-none placeholder:text-muted-foreground",
        "[&::-webkit-search-cancel-button]:appearance-none",
        "[--field-line:rgb(0_0_0/0.09)] dark:[--field-line:rgb(255_255_255/0.1)]",
        "shadow-[0_0_0_1px_var(--field-line),0_1px_2px_rgb(0_0_0/0.05)] dark:shadow-[0_0_0_1px_var(--field-line)]",
        "transition-[box-shadow] duration-[calc(150ms*var(--kf-speed,1))] ease-house motion-reduce:transition-none!",
        "hover:[--field-line:rgb(0_0_0/0.16)] dark:hover:[--field-line:rgb(255_255_255/0.18)]",
        "focus-visible:ring-[3px] focus-visible:ring-ring/25 focus-visible:[--field-line:var(--ring)] dark:focus-visible:[--field-line:var(--ring)]",
        "aria-invalid:ring-destructive/25 aria-invalid:[--field-line:var(--destructive)] dark:aria-invalid:[--field-line:var(--destructive)]",
        "data-readonly:bg-muted/50",
        "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground",
        /* Room for what the control lays over it. */
        "group-has-[>svg]/control:pl-9",
        "group-has-[[data-slot=autocomplete-trigger]]/control:pr-9 group-has-[[data-slot=autocomplete-clear]]/control:pr-9",
        "group-has-[[data-slot=autocomplete-trigger]]/control:group-has-[[data-slot=autocomplete-clear]]/control:pr-16",
        className,
      )}
      {...props}
    />
  )
}

const controlButton =
  "absolute top-1 grid size-7 cursor-pointer place-items-center rounded-[7px] text-muted-foreground outline-none hover:bg-foreground/[0.06] hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-40 [&_svg]:size-4"

function AutocompleteTrigger({
  className,
  children,
  ...props
}: React.ComponentProps<typeof AutocompleteTriggerPart>) {
  return (
    <AutocompleteTriggerPart
      className={cn(
        controlButton,
        "right-1",
        className,
      )}
      {...props}
    >
      {children ?? <ChevronIcon />}
    </AutocompleteTriggerPart>
  )
}

/* Only in the page while there is text, so it enters from its starting style. */
function AutocompleteClear({
  className,
  children,
  ...props
}: React.ComponentProps<typeof AutocompleteClearPart>) {
  return (
    <AutocompleteClearPart
      className={cn(
        controlButton,
        "right-1 group-has-[[data-slot=autocomplete-trigger]]/control:right-8 [&_svg]:size-3.5",
        className,
      )}
      {...props}
    >
      {children ?? <XIcon />}
    </AutocompleteClearPart>
  )
}

function AutocompleteContent({
  className,
  children,
  sideOffset = 6,
  ...props
}: React.ComponentProps<typeof AutocompleteContentPart>) {
  return (
    <AutocompleteContentPart
      sideOffset={sideOffset}
      className={cn(
        "group/content flex w-(--anchor-width) min-w-[200px] flex-col rounded-[14px] bg-popover text-popover-foreground outline-none",
        "[--list-height:var(--available-height)]",
        "shadow-[0_0_0_1px_rgb(0_0_0/0.06),0_2px_6px_-2px_rgb(0_0_0/0.08),0_12px_32px_-8px_rgb(0_0_0/0.18)]",
        "dark:shadow-[0_0_0_1px_rgb(255_255_255/0.08),0_12px_32px_-8px_rgb(0_0_0/0.7)]",
        className,
      )}
      {...props}
    >
      {children ?? <AutocompleteList />}
    </AutocompleteContentPart>
  )
}

function AutocompleteArrow({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteArrowPart>) {
  return (
    <AutocompleteArrowPart
      className={cn("size-2.5 rotate-45 rounded-[2px] bg-popover", className)}
      {...props}
    />
  )
}

function AutocompleteList({
  className,
  children,
  ...props
}: React.ComponentProps<typeof AutocompleteListPart>) {
  return (
    <AutocompleteListPart
      className={cn(
        "max-h-[min(calc(var(--list-height,100vh)-8px),18rem)] scroll-py-1.5 overflow-y-auto overscroll-contain rounded-[14px] p-1.5 outline-none",
        "group-has-[[data-slot=autocomplete-empty][data-empty]]/content:hidden",
        /* The gliding highlight, in the row's shape and colour. */
        "before:rounded-[8px] before:bg-accent",
        className,
      )}
      {...props}
    >
      {children ?? ((state) => <AutocompleteItems items={state.items as ListData<string>} />)}
    </AutocompleteListPart>
  )
}

function AutocompleteItem({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteItemPart>) {
  return (
    <AutocompleteItemPart
      className={cn(
        "group/item relative flex min-h-8 cursor-default items-center gap-2.5 rounded-[8px] px-2.5 py-1.5 text-[13px] leading-[1.3] outline-none select-none",
        "data-highlighted:text-accent-foreground",
        "data-disabled:pointer-events-none data-disabled:opacity-40",
        className,
      )}
      {...props}
    />
  )
}

/* The matched part of the suggestion reads stronger; the rest steps back slightly. */
function AutocompleteItemText({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteItemTextPart>) {
  return (
    <AutocompleteItemTextPart
      className={cn(
        "min-w-0 flex-1 truncate",
        "data-matched:text-foreground/70 [&_mark]:bg-transparent [&_mark]:font-semibold [&_mark]:text-foreground",
        className,
      )}
      {...props}
    />
  )
}

function AutocompleteItemIcon({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteItemIconPart>) {
  return (
    <AutocompleteItemIconPart
      className={cn(
        "grid size-4 shrink-0 place-items-center text-muted-foreground transition-colors duration-[calc(100ms*var(--kf-speed,1))] group-data-highlighted/item:text-foreground data-mirror:rtl:-scale-x-100 motion-reduce:transition-none! [&_svg]:size-4",
        className,
      )}
      {...props}
    />
  )
}

function AutocompleteGroup({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteGroupPart>) {
  return <AutocompleteGroupPart className={cn("flex flex-col", className)} {...props} />
}

function AutocompleteGroupLabel({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteGroupLabelPart>) {
  return (
    <AutocompleteGroupLabelPart
      className={cn(
        "px-2.5 pt-2 pb-1.5 text-[11px] leading-none font-medium text-muted-foreground select-none",
        className,
      )}
      {...props}
    />
  )
}

function AutocompleteSeparator({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteSeparatorPart>) {
  return (
    <AutocompleteSeparatorPart
      className={cn("-mx-1.5 my-1.5 h-px bg-border", className)}
      {...props}
    />
  )
}

function AutocompleteEmpty({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteEmptyPart>) {
  return (
    <AutocompleteEmptyPart
      className={cn(
        "hidden px-3 py-6 text-center text-[13px] text-muted-foreground data-empty:block data-loading:block",
        className,
      )}
      {...props}
    />
  )
}

function AutocompleteStatus({
  className,
  ...props
}: React.ComponentProps<typeof AutocompleteStatusPart>) {
  return (
    <AutocompleteStatusPart
      className={cn(
        "px-4 pt-3 pb-1 text-[12px] text-muted-foreground tabular-nums empty:hidden",
        className,
      )}
      {...props}
    />
  )
}

/* Renders suggestions passed as data with the styled parts above. */
function AutocompleteItems({ items }: { items?: ListData<string> }) {
  return (items ?? []).map((entry, index) => {
    if (typeof entry === "string") {
      return (
        <AutocompleteItem key={entry} value={entry}>
          <AutocompleteItemText />
        </AutocompleteItem>
      )
    }
    if ("type" in entry && entry.type === "separator") {
      return <AutocompleteSeparator key={`separator-${index}`} />
    }
    if ("type" in entry && entry.type === "group") {
      return (
        <AutocompleteGroup key={`group-${entry.label ?? index}`}>
          {entry.label && <AutocompleteGroupLabel>{entry.label}</AutocompleteGroupLabel>}
          <AutocompleteItems items={entry.items} />
        </AutocompleteGroup>
      )
    }
    const { value, label, disabled, keywords } = entry
    return (
      <AutocompleteItem
        key={value}
        value={value}
        label={label}
        disabled={disabled}
        keywords={keywords}
      >
        <AutocompleteItemText />
      </AutocompleteItem>
    )
  })
}

export {
  Autocomplete,
  AutocompleteArrow,
  AutocompleteClear,
  AutocompleteContent,
  AutocompleteControl,
  AutocompleteEmpty,
  AutocompleteGroup,
  AutocompleteGroupLabel,
  AutocompleteInput,
  AutocompleteItem,
  AutocompleteItemIcon,
  AutocompleteItems,
  AutocompleteItemText,
  AutocompleteLabel,
  AutocompleteList,
  AutocompleteSeparator,
  AutocompleteStatus,
  AutocompleteTrigger,
  createAutocompleteController,
}
```

**components/keyframery/primitives/autocomplete.tsx**

```tsx
"use client"

/* Animated drop-in for `@ui-sdk/react/autocomplete`: same parts, same props. Swap the import and keep your code.
   This file adds motion only. Colours, radii, shadows and spacing stay yours.

   - Content: Unfold from the field (scale 0.86, 6px blur, 8px toward the field, spring in, quick out).
   - Items: Cascade in one after another as the suggestions open.
   - List: Glide, one highlight that springs from row to row (CSS anchor positioning).
   - Clear button: pops in. Trigger and clear: Press. */

import {
  AutocompleteClear as AutocompleteClearPart,
  AutocompleteContent as AutocompleteContentPart,
  AutocompleteItem as AutocompleteItemPart,
  AutocompleteList as AutocompleteListPart,
  AutocompleteTrigger as AutocompleteTriggerPart,
} from "@ui-sdk/react/autocomplete"
import * as React from "react"

import { cn } from "@/lib/utils"

export * from "@ui-sdk/react/autocomplete"

const press =
  "transition-[scale,color,background-color,opacity] duration-[calc(200ms*var(--kf-speed,1))] ease-pop active:scale-[0.9] motion-reduce:transition-none!"

function AutocompleteContent({ className, ...props }: React.ComponentProps<typeof AutocompleteContentPart>) {
  return (
    <AutocompleteContentPart
      className={cn(
        "group/kf-content origin-(--transform-origin) transition-[opacity,scale,translate,filter] duration-[calc(380ms*var(--kf-speed,1))] ease-spring",
        "data-starting-style:scale-[0.86] data-starting-style:opacity-0 data-starting-style:blur-[6px]",
        "data-[side=bottom]:data-starting-style:-translate-y-2 data-[side=top]:data-starting-style:translate-y-2",
        "data-[side=left]:data-starting-style:translate-x-2 data-[side=right]:data-starting-style:-translate-x-2",
        "data-ending-style:scale-[0.96] data-ending-style:opacity-0 data-ending-style:blur-[2px] data-ending-style:duration-[calc(150ms*var(--kf-speed,1))] data-ending-style:ease-house",
        "motion-reduce:transition-none!",
        className,
      )}
      {...props}
    />
  )
}

/* The list carries the highlight: a `::before` that follows whichever suggestion is highlighted.
   Its neutral surface follows the text colour; give `before:bg-…` in className to change it. */
function AutocompleteList({ className, ...props }: React.ComponentProps<typeof AutocompleteListPart>) {
  return (
    <AutocompleteListPart
      className={cn(
        "relative isolate [anchor-scope:--kf-hl]",
        "before:pointer-events-none before:absolute before:-z-10 before:bg-[color-mix(in_oklch,currentColor_9%,transparent)] before:opacity-0",
        "before:[position-anchor:--kf-hl] before:top-[anchor(top)] before:right-[anchor(right)] before:bottom-[anchor(bottom)] before:left-[anchor(left)]",
        "before:transition-[top,right,bottom,left,opacity] before:duration-[calc(260ms*var(--kf-speed,1))] before:ease-spring",
        "has-[[data-highlighted]]:before:opacity-100",
        "motion-reduce:before:transition-none!",
        className,
      )}
      {...props}
    />
  )
}

/* Suggestions cascade while the content has its starting style, and anchor the highlight.
   Only opacity, translate and filter carry the delay, so hovering is never slowed. */
function AutocompleteItem({ className, ...props }: React.ComponentProps<typeof AutocompleteItemPart>) {
  return (
    <AutocompleteItemPart
      className={cn(
        "transition-[opacity,translate,filter] duration-[calc(420ms*var(--kf-speed,1))] ease-spring [transition-delay:calc((min(sibling-index(),10)-1)*calc(32ms*var(--kf-speed,1)))]",
        "group-data-starting-style/kf-content:translate-y-2 group-data-starting-style/kf-content:opacity-0 group-data-starting-style/kf-content:blur-[4px]",
        "group-data-ending-style/kf-content:[transition-delay:0ms]",
        "group-data-starting-style/kf-content:transition-none",
        "data-highlighted:[anchor-name:--kf-hl]",
        "motion-reduce:transition-none!",
        className,
      )}
      {...props}
    />
  )
}

function AutocompleteTrigger({ className, ...props }: React.ComponentProps<typeof AutocompleteTriggerPart>) {
  return (
    <AutocompleteTriggerPart
      className={cn(
        press,
        "[&_svg]:transition-[rotate] [&_svg]:duration-[calc(420ms*var(--kf-speed,1))] [&_svg]:ease-spring data-open:[&_svg]:rotate-180 motion-reduce:[&_svg]:transition-none",
        className,
      )}
      {...props}
    />
  )
}

/* Only in the page while there is text, so it pops in from its starting style. */
function AutocompleteClear({ className, ...props }: React.ComponentProps<typeof AutocompleteClearPart>) {
  return (
    <AutocompleteClearPart
      className={cn(press, "duration-[calc(360ms*var(--kf-speed,1))] starting:scale-50 starting:opacity-0", className)}
      {...props}
    />
  )
}

export { AutocompleteClear, AutocompleteContent, AutocompleteItem, AutocompleteList, AutocompleteTrigger }
```

## Questions

### How does the animated Autocomplete for UI SDK move?

Unfold: Suggestions unfold from the field. Cascade: Rows arrive one after another. Glide: One highlight glides between suggestions as you move. Pop: The clear button pops in once there is something to clear.

### Do I need Motion or Framer Motion for the animated Autocomplete?

No. Every move is plain CSS, so there is nothing to install besides the component and UI SDK.

### Can I keep my own styling and only take the motion?

Yes. Import from `@/components/keyframery/primitives/autocomplete` instead. It has the same parts and props as `@ui-sdk/react/autocomplete` and adds motion only.

### What happens to the Autocomplete when someone turns on reduced motion?

Nothing moves. State changes happen at once, or with a short fade.
