Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Mentions

Insert literal mention suggestions into controlled native multiline text.

Public APILumenMentionsApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Apple Vision · visionOS 1+

Native example

Use Mentions

Hosts control text and UTF-16 selection atomically. Native iOS and Android composition is preserved; React Native hosts supply isComposing when available. ASCII mention values use literal filtering and safe token boundaries.

Mentions rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenMentions("Message", value: $value, options: options)

Reference

Public API

The primary shared and platform-specific options exposed by LumenMentions.

APIValues or typeDefaultDescription
value / options / triggerControlled text and selection / stable suggestions / literal triggerRequired / required / @Preserves host state and inserts enabled validated suggestions.

Native behavior

Design and accessibility

When to use it

Hosts control text and UTF-16 selection atomically. Native iOS and Android composition is preserved; React Native hosts supply isComposing when available. ASCII mention values use literal filtering and safe token boundaries.

Accessibility

Named multiline input and enabled suggestion actions with controlled selection.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package