
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
translucent
Advanced tools
Demo : https://byeolbit.github.io/translucent
Firefox 35.0 | Chrome 53.0 | Safari 6 | Edge 38.0 | Opera 40.0 |
---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() |
※ Not support Internet Explorer. (It does not support CSS filter)
<script src="https://cdn.jsdelivr.net/npm/translucent@1.0.12/dist/translucent.min.js"></script>
<div class="your-background">
<div class="your-element">
<!-- your card contents here -->
</div>
</div>
let yourElement = document.body.querySelector('.your-element');
let translucent = new Translucent(yourElement);
or you can customize options.
let translucent = new Translucent(yourElement, {
bgElement : '.your-background', // id or class name
filterValue : 5, // int
cardColor : 'clear', // preset color or your own color
shadow : true // true or false
});
Apply translucent card them to element.
HTMLElement
Attribute | Type | Default | Description |
---|---|---|---|
bgElement | string | parent of target element | Background element. |
filterValue | number | 10 | This is blur value. |
cardColor | string | 'white' | Color of card. You can use preset or your own color. Preset : 'clear' , 'white' , 'grey' , 'black' |
shadow | boolean | true | This decides shadow effect of element. true applies effect. |
Change amount of blur for background.
number
// Apply 20 blur to background
translucent.blur(20);
Destroy translucent from the element.
Translucent.destroy();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/translucent@1.0.12/dist/jquery.translucent.min.js"></script>
<div class="your-background">
<div class="your-element">
<!-- your card contents here -->
</div>
</div>
$('.your-element').Translucent();
or you can customize options.
$('.your-element').Translucent({
background: '.your-background', // id or class name
filterValue : 5, // int
cardColor : 'clear', // preset color or your own color
shadow : true // true or false
});
Apply translucent card them to element.
string
Attribute | Type | Default | Description |
---|---|---|---|
bgElement | string | parent of target element | Background element. |
filterValue | number | 10 | This is blur value. |
cardColor | string | 'white' | Color of card. You can use preset or your own color. Preset : 'clear' , 'white' , 'grey' , 'black' |
shadow | boolean | true | This decides shadow effect of element. true applies effect. |
Change amount of blur for background.
number
// Apply 20 blur to background
$('.your-element').Translucent('blur', 20);
Destroy translucent from the element.
$('.your-element').Translucent('destroy');
FAQs
Translucent plastic card theme.
The npm package translucent receives a total of 9 weekly downloads. As such, translucent popularity was classified as not popular.
We found that translucent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.