Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@fluido/react-effects

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluido/react-effects

Fluido webapp effects

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Fluido Effects

useRipple

const { anchor } = useRipple()
// or
const { anchor } = useRipple({
  toCenter: true,
  disabled: false,
})

return <button ref={anchor}>BUTTON</button>

useScrollDetector

const [scroll] = useScrollDetector()
// or
const [scroll, ref] = useScrollDetector(true) // for a element scroll

console.log(scroll.value)
/*
{ toUp: false, toDown: false, toLeft: false, toRight: false }
*/

// if it's a container scroll
return <div ref={ref}>{...data}</div>

useTheme

const theme = useTheme() // a theme state
// or
const theme = useTheme(true) // for disabled local-storage persistence

console.log(theme.value)
/*
  '' | 'dark' | 'light'
*/

// HTML DOM
// if value it's 'dark'
<html dark-theme/>
// if value it's 'light'
<html light-theme/>

Keywords

fluido

FAQs

Package last updated on 06 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts