0.1.2 โ€ข Published 10 months ago

@nolly-cafe/react-preloaders v0.1.2

Weekly downloads
-
License
NFE-OSL v1.0
Repository
github
Last release
10 months ago

๐ŸŒ€ React Preloaders

๐ŸŒˆ Ultra-dev-friendly, fully customizable preloader components for React โ€” built with TypeScript, SCSS, and zero config.


Checkout the demo for a live preview of all preloaders!


โœจ Features

  • ๐Ÿ”Ÿ 10+ unique preloaders (animated with CSS/SCSS)
  • ๐Ÿง  100% TypeScript with full JSDoc
  • ๐ŸŽจ Fully customizable via props (color, size, duration, etc.)
  • ๐Ÿงฉ Works with SSR, React 18+, Vite, Webpack...
  • ๐Ÿ’… Styled with clean, scoped SCSS (no styled-components)
  • ๐Ÿ› ๏ธ Just import and use โ€” no setup required

๐Ÿ“ฆ Install

npm i @nolly-cafe/react-preloaders
# or
pnpm add @nolly-cafe/react-preloaders

๐Ÿงช Usage

import { Dots } from '@nolly-cafe/react-preloaders'

function App() {
  return <Dots color='#f0f' count={6} fullScreen />
}

๐ŸŒˆ Available Preloaders

NameDescription3D?
DotsBouncing dotsโŒ
LinesEqualizer-style barsโŒ
ZoomBars scale rhythmicallyโŒ
SquareRotating square with fillโŒ
RippleExpanding ripple circlesโŒ
SugarBouncy glossy candy dotโŒ
PlanetsOrbiting balls around a sunโœ…
Cube3D cube spinning on X/Yโœ…
Spinner3DSpinning coin/discโœ…
TunnelExpanding tunnel of ringsโœ…

โš™๏ธ Props (Common Across All)

PropTypeDefaultDescription
colorstring#2D2D2DMain color (hex/rgb/css var)
sizenumbervariesMain size/dimension
durationnumbervariesAnimation duration in seconds
fullScreenbooleanfalseWhether to stretch to full screen
classNamestring''Extra CSS class name(s)

๐Ÿ‘‰ Specific preloaders like Dots, Lines, Zoom etc. include more advanced props like count, gap, barHeight, etc. See inline jsDocs for all props!


๐Ÿงฉ Custom Preloaders

You can use the <Preloader /> wrapper for your own animations:

import { Preloader } from '@nolly-cafe/react-preloaders'

function CustomLoader() {
  return <div className='my-spinner' />
}

function App() {
  return (
    <Preloader background='blur' animation='slide-up' time={2000}>
      <CustomLoader />
    </Preloader>
  )
}

Props

PropTypeDefaultDescription
colorstring#2D2D2DSets the CSS color used by the animation.
backgroundstring#ffffffBackground of the loader. Use 'blur' for blur effect.
animationstringfadeExit animation: 'fade', 'slide-up', 'slide-down', etc.
timenumber1300Auto-dismiss time (ms) if customLoading is undefined.
customLoadingbooleanundefinedManual loading toggle (e.g. from a fetch or Redux state).
childrenReactNodenullThe custom animation to show.

๐Ÿ“œ License

NFE-OSL v1.0 (Fair & Ethical Open-Source License) Read full license in the LICENSE file.


๐Ÿ’Œ Made with love by Nolly's Cafe โœจ

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago