LoadingIndicator
Loading indicator
Determinate morphs between a circle and a soft-burst shape as progress advances; indeterminate loops continuously through seven Material 3 Expressive shapes with a real polygon-morph animation, precomputed offline from the pinned source's own shape-matching algorithm.
import { LoadingIndicator, Surface, Text } from '@language-lit/material3-expressive'
export function LoadingIndicatorExample() {
return (
<Surface
as="section"
aria-labelledby="loading-indicator-example-title"
color="surface-container-low"
shape="extra-large"
className="loading-indicator-example"
>
<Text as="h2" id="loading-indicator-example-title" variant="titleLarge" emphasis="emphasized">
Loading indicator
</Text>
<Text as="p" variant="bodyMedium">
Determinate morphs between a circle and a soft-burst shape as
progress advances; indeterminate loops continuously through seven
Material 3 Expressive shapes with a real polygon-morph animation,
precomputed offline from the pinned source's own shape-matching
algorithm.
</Text>
<div className="loading-indicator-example__row">
<LoadingIndicator aria-label="Loading, empty" value={0} />
<LoadingIndicator aria-label="Loading, low" value={0.05} />
<LoadingIndicator aria-label="Loading, mid" value={0.45} />
<LoadingIndicator aria-label="Loading, high" value={0.98} />
<LoadingIndicator aria-label="Loading, complete" value={1} />
<LoadingIndicator aria-label="Loading, custom max" value={150} max={200} />
<LoadingIndicator aria-label="Loading" />
</div>
</Surface>
)
}LoadingIndicatorはMaterial 3 Expressiveのシェイプ変形ローディングインジケーターを表示します。確定進捗にはvalueを指定すると、円と柔らかな放射形の間で変形します。valueを省略すると、7種類のシェイプを連続して変形する不確定ループになります。確定/不確定の仕様はネイティブの<progress>要素と同じです。
import { LoadingIndicator } from '@language-lit/material3-expressive'
import '@language-lit/material3-expressive/styles.css'
<LoadingIndicator aria-label="Loading" value={0.4} />
<LoadingIndicator aria-label="Loading" />仕様
[0, max]の数値であるvalueを指定すると、正確なaria-valuenowを持つ確定進捗を表示し、進捗に応じて円と柔らかな放射形の間で変形します。valueを省略すると不確定モードになり、aria-valuenowを出力せずに7種類のシェイプを連続して変形・回転します。これにより支援技術に処理中または不確定な状態を伝えます。maxの既定値は1です。aria-labelまたはaria-labelledbyで必須のアクセシブルネームを指定します。LoadingIndicator自体に表示ラベルはありません。- 固有サイズは
48pxです。--m3e-comp-loading-indicator-container-widthと-container-heightを上書きするとサイズを変更できます。 - コンテナーなしの表示のみをサポートします。色付きコンテナーのバリアントはありません。
トークンと境界
色とレイアウトはすべてMaterial3Providerがスコープする--m3e-comp-loading-indicator-* CSSカスタムプロパティから取得します。LoadingIndicatorは実行時スタイルを注入せず、requestAnimationFrameループも使いません。確定状態の動きはvalue propに基づく単純な関数で、ソースと同じポリゴン変形補間をレンダー時に同期計算します。不確定状態の動きはCSSの@keyframesだけで実現し、ソースのスプリングを再現するlinear()イージングを使います。シェイプの形状データは、ソースのRoundedPolygon/Morphシェイプ照合アルゴリズムを忠実に移植して事前生成しています。手法の詳細はADR 0022を参照してください。