Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
slick-bottom-sheet
Advanced tools
Readme
Modern bottom sheet component for React, built with Framer Motion.
Slick Bottom Sheet is a bottom sheet component with buttery smooth animation and user friendly interactions for React. The gestures and animations are handled with Framer Motion. It aims to provide a simple and flexible API that works out of the box, with minimal dependencies.
This package requires framer-motion as a peer dependency.
npm install slick-bottom-sheet
yarn add slick-bottom-sheet
pnpm install slick-bottom-sheet
or clone the repo and run the ./example
Next.JS app locally.
For now, please refer to JSDoc and demo source code.
"use client";
import React from "react";
import { SlickBottomSheet, SlickBottomSheetControl } from "slick-bottom-sheet";
export default function Page() {
const [isOpen, setIsOpen] = React.useState(false);
const ref = React.useRef<SlickBottomSheetControl>(null);
React.useEffect(() => {
setIsOpen(true);
}, []);
return (
<>
<div className="grid place-items-center h-full">
<button
className="px-4 py-2 bg-zinc-100 rounded-md"
onClick={() => {
console.log("open");
setIsOpen(true);
}}
>
Open
</button>
</div>
<SlickBottomSheet
isOpen={isOpen}
onCloseStart={() => {
setIsOpen(false);
}}
ref={ref}
onSnap={console.log}
className="bg-white rounded-t-2xl overflow-hidden shadow-xl z-10 isolate border"
header={
<div className="flex justify-center py-2">
<div className="w-10 h-1 rounded-full bg-zinc-400" />
</div>
}
footer={
<div className="p-4">
<button
onClick={() => ref.current?.snapTo("close")}
className="w-full bg-indigo-600 py-2 font-medium text-white rounded"
>
Dismiss
</button>
</div>
}
backdropClassName="backdrop-blur-sm bg-black bg-opacity-10"
>
<div className="p-4">
<div className="h-48 grid place-items-center font-bold">
<div className="text-center">
<p className="text-3xl mb-4">Hello There!</p>
<p>
This is a sheet demo with default breakpoint ["auto"].
</p>
<p>You can drag the sheet or backdrop to control the sheet.</p>
</div>
</div>
</div>
</SlickBottomSheet>
</>
);
}
FAQs
Modern bottom sheet component for React, built with Framer Motion.
The npm package slick-bottom-sheet receives a total of 23 weekly downloads. As such, slick-bottom-sheet popularity was classified as not popular.
We found that slick-bottom-sheet 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.