Skip to content

Pulse Spinner

The PulseSpinner component displays a loading animation with a pulsing circle effect, creating a smooth and minimalist loading indicator.

Basic Usage

jsx
import { PulseSpinner } from "fancy-react-ui";

function App() {
  return <PulseSpinner />;
}

Live Demo:

Props

Prop NameTypeDefaultDescription
sizenumber40Size in pixels
colorstring#0066ffColor of the circle
speednumber0.8Animation speed in seconds
classNamestring""Additional CSS class names
styleobject{}Additional inline styles

Examples

Basic Pulse Spinner

jsx
<PulseSpinner size={50} color="#F44336" speed={0.6} />

Custom Size and Color

jsx
<PulseSpinner size={60} color="#9933ff" />

Custom Speed

jsx
<PulseSpinner speed={1.2} color="#ff3366" />

With Custom Styling

jsx
<PulseSpinner
  size={50}
  color="#33cc33"
  className="custom-pulse"
  style={{ margin: "20px" }}
/>

Implementation Details

The PulseSpinner consists of a single circle that pulses using CSS animation. The animation is applied to the container while the circle maintains its color and shape.

jsx
// Internal structure
<div className="pulse-spinner">
  <div className="pulse-circle" />
</div>

The animation duration can be controlled through the speed prop, which is applied directly to the container element.

Common Use Cases

Highlight typical scenarios where the spinner might be used:

  • Page loading indicators
  • Button loading states
  • Form submission feedback
  • Content refresh indicators
  • Network request states

Troubleshooting

Address potential issues developers might encounter, like:

  • Animation smoothness
  • Browser compatibility considerations
  • Performance optimization tips
  • Mobile responsiveness
  • Animation timing adjustments

Explore similar components within the same library or ecosystem to find the best fit for your use case:

Released under the MIT License.