# Ghost Text Inline suggestions for AI chat composers: the rest of the message in light gray as people type. Tab to accept. [Live demo](https://hardflip.studio/ghost-text) · [Playground](https://hardflip.studio/ghost-text/playground/) ## Installation With React: ```sh npm install @ghosttext/core @ghosttext/react ``` Without a framework: ```sh npm install @ghosttext/core @ghosttext/dom ``` For Chrome's on-device model, add `@ghosttext/chrome-ai`. ## Quick start ### React ```tsx import { chromeAI } from '@ghosttext/chrome-ai'; import { cascade, history } from '@ghosttext/core'; import { useGhostText } from '@ghosttext/react'; const source = cascade(history(), chromeAI()); export function Composer({ messages, value, onChange, isStreaming }) { const { ghostTextRef } = useGhostText({ source, messages, suggest: !isStreaming, }); return (