@molecule/app-typing-indicator-solid
Feature · typing-indicator · App (browser) · v1.2.1 · Apache-2.0
Three-dot animated typing indicator for chat UIs
npm install @molecule/app-typing-indicator-solidHow it works
@molecule/app-typing-indicator-solid is a ready-made typing-indicator feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { TypingIndicator } from '@molecule/app-typing-indicator-solid'
const isTyping = true
<TypingIndicator visible={isTyping} ariaLabel="Alice is typing…" />Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid
Reference
Solid three-dot typing indicator for chat UIs.
Exports <TypingIndicator> — the Solid counterpart of
@molecule/app-typing-indicator-react: CSS-only three-dot pulse animation,
the same props (React names) and the same DOM for the same input.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { TypingIndicator } from '@molecule/app-typing-indicator-solid'
const isTyping = true
<TypingIndicator visible={isTyping} ariaLabel="Alice is typing…" />
Type
feature
Installation
npm install @molecule/app-typing-indicator-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js
API
Interfaces
TypingIndicatorProps
Props accepted by the TypingIndicator component.
interface TypingIndicatorProps {
/** Whether to render. Defaults to true. */
visible?: boolean
/** Dot diameter in pixels. Defaults to 6. */
dotSize?: number
/** Animation duration in ms. Defaults to 1200. */
durationMs?: number
/**
* Accessible label. Overrides the translated / `defaultValue` `'Typing…'`
* (prop > `t()` > default).
*/
ariaLabel?: string
/** Extra classes. */
className?: string
}
Functions
TypingIndicator(props)
Three-dot "typing…" animation. CSS-only (no library dependency) —
uses @keyframes defined via inline style tag. Renders three dots
that pulse in sequence. The stylesheet also turns the pulse off under
prefers-reduced-motion: reduce, so the dots stay still for users who ask
for less motion (WCAG 2.3.3) instead of relying on a host stylesheet.
The motion comes from the ClassMap's typingPulse recipe, read when the
component renders as React's PulseDots reads it, and falls back to
DEFAULT_TYPING_PULSE.
function TypingIndicator(props: TypingIndicatorProps): JSX.Element
props— Component props (seeTypingIndicatorProps).
Returns: The rendered typing indicator.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-solid^3.5.0 || ^4.0.0@molecule/app-ui^1.9.0@molecule/app-ui-solid^1.1.0solid-js^1.8.0
Runtime Dependencies
@molecule/app-solid@molecule/app-ui@molecule/app-ui-solidsolid-js
Dots use currentColor, so the indicator inherits the surrounding text
color — wrap it in a muted-text container to dim it. The default
ariaLabel is the translated typingIndicator.aria.label (English
'Typing…', via @molecule/app-locales-typing-indicator); the ariaLabel
prop overrides it. Each instance injects its own <style> tag for the
keyframes (fine for a chat view; avoid hundreds at once). Props (documented
on the exported TypingIndicatorProps interface): visible (default true),
dotSize (px, default 6), durationMs (default 1200), ariaLabel, className.
Translations
Translation strings are provided by @molecule/app-locales-typing-indicator.