フィードバック · 準拠済み
WavyProgress
WavyProgressWavyProgressPropsWavyProgressShape
Wavy progress
The Material 3 Expressive traveling-wave/rippling-ring treatment, determinate at a few fractions (watch the amplitude ramp down near 0% and 100%) and self-animating indeterminate.
Linear — determinate
Linear — custom max
Linear — indeterminate
Circular
import { Surface, Text, WavyProgress } from '@language-lit/material3-expressive'
export function WavyProgressExample() {
return (
<Surface
as="section"
aria-labelledby="wavy-progress-example-title"
color="surface-container-low"
shape="extra-large"
className="wavy-progress-example"
>
<Text as="h2" id="wavy-progress-example-title" variant="titleLarge" emphasis="emphasized">
Wavy progress
</Text>
<Text as="p" variant="bodyMedium">
The Material 3 Expressive traveling-wave/rippling-ring treatment,
determinate at a few fractions (watch the amplitude ramp down near
0% and 100%) and self-animating indeterminate.
</Text>
<Text as="p" variant="labelLarge">Linear — determinate</Text>
<WavyProgress aria-label="Upload progress, empty" value={0} />
<WavyProgress aria-label="Upload progress, low" value={0.05} />
<WavyProgress aria-label="Upload progress, mid" value={0.45} />
<WavyProgress aria-label="Upload progress, high" value={0.98} />
<WavyProgress aria-label="Upload progress, complete" value={1} />
<Text as="p" variant="labelLarge">Linear — custom max</Text>
<WavyProgress aria-label="Upload progress, custom max" value={150} max={200} />
<Text as="p" variant="labelLarge">Linear — indeterminate</Text>
<WavyProgress aria-label="Syncing" />
<Text as="p" variant="labelLarge">Circular</Text>
<div className="wavy-progress-example__row">
<WavyProgress aria-label="Progress, empty" shape="circular" value={0} />
<WavyProgress aria-label="Progress, low" shape="circular" value={0.05} />
<WavyProgress aria-label="Progress, mid" shape="circular" value={0.45} />
<WavyProgress aria-label="Progress, high" shape="circular" value={0.98} />
<WavyProgress aria-label="Progress, complete" shape="circular" value={1} />
<WavyProgress aria-label="Progress, custom max" shape="circular" value={150} max={200} />
<WavyProgress aria-label="Syncing" shape="circular" />
</div>
</Surface>
)
}WavyProgressはMaterial 3 Expressiveの波が移動する表現を表示します。バーに沿う滑らかな二次曲線の波(shape="linear"、既定値)か、リングを囲む角丸の9点波紋(shape="circular")を選べます。確定進捗にはvalueを指定し、連続してアニメーションする不確定な波にはvalueを指定しません。仕様はネイティブの<progress>要素と同じです。
import { WavyProgress } from '@language-lit/material3-expressive'
import '@language-lit/material3-expressive/styles.css'
<WavyProgress aria-label="Upload progress" value={0.4} />
<WavyProgress aria-label="Progress" shape="circular" value={0.4} />
<WavyProgress aria-label="Syncing" />仕様
shape: 'linear' | 'circular'(既定値'linear')で向きを選びます。[0, max]の数値であるvalueを指定すると、正確なaria-valuenowを持つ確定進捗を表示します。進捗が0%または100%に近づくと波の振幅はほぼ平らになるまで小さくなります。valueを省略すると不確定モードになり、aria-valuenowを出力せず、振幅は常に最大になります。maxの既定値は1です。必須のアクセシブルネームにはaria-labelまたはaria-labelledbyを指定します。shape="linear"のinline-sizeは既定で100%です。shape="circular"の固有サイズは48pxです。この幅の違いはLinearProgress/CircularProgressと同じです。- 直線の波は
10pxのコンテナーの両端に4pxのストローク幅の半分を確保し、山と谷が欠けないようにします。円形の波はストロークに必要な余白を設けた44pxの描画領域に、対応する円形/星形の三次ベジェ曲線を使います。固定された24pxのviewBox中心を軸に回転します。同期したダッシュの移動により、円形の波が移動してもスイープの端点はその場に保たれます。 - 指定された振幅しきい値では、ストローク幅を保ちながら、確定進捗の形状を平坦なパスと完全な波形パスの間で変形します。SVGの拡大縮小や不透明度のクロスフェードは使いません。
- 円形の不確定モードでは、Materialの円形トラックを表示したままアクティブなスイープと一緒に回転させ、端の丸みに合わせた隙間を連続して保ちます。
- 波のない表示には
LinearProgress/CircularProgressを使います。
トークンと境界
色、形状、モーションのタイミングはすべてMaterial3Providerがスコープする--m3e-comp-wavy-progress-* CSSカスタムプロパティから取得します。WavyProgressは実行時スタイルを注入せず、requestAnimationFrameループも使いません。波の移動、不確定状態の動き、振幅の変化はすべてCSSのtransform/@keyframes/transitionで実現します。また、Next.js、Vite、ルーター、アニメーションライブラリ、非公開のアプリケーションコードをインポートしません。