Skip to content

InputMenu: rename autocomplete prop to mode to free up the native HTML attribute #61

Description

@IgorShevchik

Summary

To stay aligned with the upstream Nuxt UI API, the InputMenu autocomplete prop should be renamed to mode.

Nuxt UI introduced this as a breaking change in v4.8.0:

InputMenu renames autocomplete prop to mode to free up the HTML attribute

The reason is that autocomplete shadows the native HTML autocomplete input attribute, so consumers can no longer forward the real attribute to the underlying input. Renaming the behavioral prop to mode frees the native attribute name back up.

This is currently the only API-level divergence from upstream Nuxt UI (b24ui v2.x ↔ nuxt/ui v4.x, offset -2). The boolean prop was ported into b24ui in v2.6.0, but the subsequent rename in nuxt/ui v4.8.0 has not yet been applied — b24ui v2.8.0 still exposes autocomplete.

Current state

src/runtime/components/InputMenu.vue:

  • The prop is still declared as autocomplete?: boolean (around line 180):
/**
 * When `true`, the input accepts free-form text with optional suggestions.
 * The `modelValue` becomes the input text (string) instead of a selected item.
 * @defaultValue false
 */
autocomplete?: boolean
  • The native HTML autocomplete attribute is omitted from the extended InputHTMLAttributes (line 44):
Omit<InputHTMLAttributes, 'autocomplete' | 'disabled' | 'name' | ...>
  • Internal usages reference props.autocomplete (lines ~298, 299, 412, 425, 457, 465, 491).

Proposed change

  • Rename the prop autocomplete → mode (keeping the same behavior/values), matching nuxt/ui v4.8.0.
  • Update all internal references in InputMenu.vue.
  • Stop omitting autocomplete from the extended InputHTMLAttributes so the native attribute can be forwarded again.
  • Update docs, types, and snapshots accordingly.
  • Treat this as a breaking change in the changelog (consumers using :autocomplete must migrate to :mode).

References

Activity

  1. added a commit that references this issue on Jun 5, 2026
    081a979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions