Skip to main content

GenerativeSkeleton

Package: @synapse-ui/generative-skeleton
Selector: synapse-generative-skeleton
Status: Stable

A contextual loading indicator that visually differentiates AI processing from standard network spinners.

Overview

Standard loading spinners don't communicate what kind of work is happening. GenerativeSkeleton uses a shimmer animation patterned after AI output layouts — text lines, code block placeholders, and avatar slots — so users understand the app is generating content, not just fetching data.

Installation

npm install @synapse-ui/generative-skeleton @synapse-ui/theme

Basic Example

import { Component } from '@angular/core';
import { GenerativeSkeletonComponent } from '@synapse-ui/generative-skeleton';

@Component({
selector: 'app-loading',
standalone: true,
imports: [GenerativeSkeletonComponent],
template: `
@if (isGenerating) {
<synapse-generative-skeleton variant="paragraph" [lines]="4" />
}
`,
})
export class LoadingComponent {
isGenerating = true;
}

API Reference (Planned)

Inputs

InputTypeDefaultDescription
variant'paragraph' | 'code' | 'mixed''paragraph'Layout pattern
linesnumber3Number of text line placeholders
animatedbooleantrueEnable shimmer animation
ariaLabelstring'Generating response...'Accessible label

Variants

VariantUse Case
paragraphText-heavy AI responses
codeCode generation responses
mixedResponses with text and code blocks

Accessibility

  • Uses role="status" and aria-busy="true".
  • Respects prefers-reduced-motion — falls back to static placeholders.

Theming

ElementToken
Base shimmer--synapse-ai-skeleton-base
Highlight--synapse-ai-skeleton-highlight