Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
The most advanced Flip animation library for Solid.js inspired by react-flip-toolkit
The most advanced Flip animation library for Solid.js inspired by react-flip-toolkit
pnpm add solid-flip
or with npm
npm install solid-flip
FlipProvider
import { FlipProvider } from 'solid-flip';
const root = document.getElementById('root');
render(() => (
<FlipProvider> // Like this
<App/>
</FlipProvider>
), root!);
Flip
component to wrap your animated component
import { Flip } from 'solid-flip';
<Flip id={'my-flip-id'}> // `id` property need to be unique
<div class={'show'}>Animated content</div>
</Flip>
Flip
component
import { Flip } from 'solid-flip';
const [show, setShow] = createSignal(false);
<Show
when={show()}
fallback={
<Flip id={'my-flip-id'}>
<div class={'hidden'}>Animated content</div>
</Flip>
}
>
<Flip id={'my-flip-id'}>
<div class={'show'}>Animated content</div>
</Flip>
</Show>
or
import { Flip } from 'solid-flip';
const [show, setShow] = createSignal(false);
<Flip id={'my-flip-id'} with={show()}> // set `with` property that will be used to determine when the content should be animated
<div class={show() ? 'show' : 'hidden'}>Animated content</div>
</Flip>
End! You have successfully added flip animation to your component!
Please check the example folder or codesandbox for more details. (TODO)
https://github.com/user-attachments/assets/69367673-8edc-4c7d-816c-59a15743b05d
<Flip id={'flip2'} with={flip2()}>
<div class={flip2() ? 'card blue fullscreen' : 'card red'} onClick={() => setFlip2(!flip2())}>
<Unflip>
<div>
{flip2() ? 'Click Again!' : 'Click!'}
</div>
</Unflip>
</div>
</Flip>
https://github.com/user-attachments/assets/a6b4f260-f76a-4ce6-b5a9-448697607a3b
<div class={'grid'}>
<For each={flip5()}>
{(item) => (
<Flip id={`flip5-${item}`} with={flip5()}>
<div class={'card'}>
{item}
</div>
</Flip>
)}
</For>
</div>
https://github.com/user-attachments/assets/0547a512-7032-4cce-940f-512de78538ef
<div class={'grid'}>
<For each={flip6()}>
{(item) => (
<Flip id={`flip6-group-${item.id}`} with={flip6()}>
<div class={'card grid'}>
<For each={item.items}>
{(subItem) => (
<Flip id={`flip6-${subItem}`} with={flip6()}>
<div class={'card'}>
{subItem}
</div>
</Flip>
)}
</For>
</div>
</Flip>
)}
</For>
</div>
FlipProvider
component is used to wrap the root component of your application. It provides the context for the flip animation.
If you don't wrap your root component with FlipProvider
, the flip animation will not work.
Flip
component is used to wrap the content that you want to animate. It directly passes children.
Property | Type | Default | Description |
---|---|---|---|
id | string | (required) | The unique id of the flip component |
with | unknown | unknown[] | [] | The condition to determine when the content should be animated |
duration | number | 300 | The duration of the animation |
easing | string | 'ease' | The easing of the animation |
properties | string | string[] | [] | The additional properties that will be animated |
Unflip
component is used to warp the content that ignore parent flip animation. It directly passes children.
Property | Type | Default | Description |
---|---|---|---|
id | string | - | A parent id that ignore flip animation |
FAQs
The most advanced Flip animation library for Solid.js inspired by react-flip-toolkit
The npm package solid-flip receives a total of 1,017 weekly downloads. As such, solid-flip popularity was classified as popular.
We found that solid-flip demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.