Gradient Glow Button
A call-to-action button with a gradient fill and a soft coloured glow on hover.
6 個のフレームワーク初級
A button that shows an inline spinner and blocks input while work is in flight.
<button class="load-btn" type="button" aria-busy="true" disabled>
<span class="load-btn__spinner" aria-hidden="true"></span>
Saving…
</button>| Prop | 型 | デフォルト | 説明 |
|---|---|---|---|
loading | boolean | false | true の間はスピナーを表示し、入力をブロックします。 |
children必須 | ReactNode | - | コンポーネントの内部にレンダリングされるコンテンツ。 |
disabled | boolean | false | 操作を無効にし、コントロールを淡色表示にします。 |
onClick | () => void | - | ユーザーがコントロールを実行したときに発火します。 |
The spinner is a bordered circle with one contrasting edge - change `border-t-white` to recolour it. Drive `loading` from your submit handler; the button disables itself so double-submits are impossible.