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.