Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluent-reveal-effect2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-reveal-effect2

Reveal Effect (Fluent Design)

  • 2.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Reveal Effect library (Fluent Design System)

Apply reveal effect to border and background of elements.

FOSSA Status

Screenshot

Demo

Install

Run the command

npm i fluent-reveal-effect@latest

NPM package: https://www.npmjs.com/package/fluent-reveal-effect

Usage

Import the library

import { FluentRevealEffect } from "fluent-reveal-effect"

Basic CSS

.btn {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	padding: 1rem 2rem;
	background-color: #333;
	color: #fff;
	border: 0;
	
	transition: all 200ms ease;
}
.btn-border {
	display: inline-block;
	margin: 5px;
}
.btn-border .btn {
	display: block;
	margin: 2px;
}

Apply background effect

HTML mockup
<button class="btn">Button 1</button>
JavaScript
FluentRevealEffect.applyEffect(".btn", {
	lightColor: "rgba(255,255,255,0.1)",
	gradientSize: 150
})
Enable Ripple click effect
FluentRevealEffect.applyEffect(".btn", {
	clickEffect: true
})

Apply border and background effect

HTML mockup
<div class="effect-group-container">
    <div class="btn-border">
        <button class="btn">Button 2</button>
    </div>
    <div class="btn-border">
        <button class="btn">Button 3</button>
    </div>
    <div class="btn-border">
        <button class="btn">Button 4</button>
    </div>
</div>
JavaScript
FluentRevealEffect.applyEffect(".effect-group-container", {
	clickEffect: true,
	lightColor: "rgba(255,255,255,0.6)",
	gradientSize: 80,
	isContainer: true,
	children: {
		borderSelector: ".btn-border",
		elementSelector: ".btn",
		lightColor: "rgba(255,255,255,0.3)",
		gradientSize: 150
	}
})

Donate

If you feel this little library useful to you, it would go a great way to ensuring that I can afford to take the time to continue to develop it.

Thanks for your gratitude and finance help!

Buy me a beer?

License

FOSSA Status

Keywords

FAQs

Package last updated on 30 Nov 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc