BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/prompt-kit/scroll-button

Scroll Button

prompt-kit/scroll-button
FreeComponent

A floating button component that appears when users scroll up in a container, allowing them to quickly return to the bottom of the content

Live preview

live · rendered by the registry
Rendered by prompt-kit on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/ibelick/prompt-kit/HEAD/public/c/scroll-button.json

Source

scroll-button.tsxraw.githubusercontent.com/ibelick/prompt-kit/HEAD/public/c/scroll-button.json
1"use client"
2
3import { Button, buttonVariants } from "@/components/ui/button"
4import { cn } from "@/lib/utils"
5import { type VariantProps } from "class-variance-authority"
6import { ChevronDown } from "lucide-react"
7import { useStickToBottomContext } from "use-stick-to-bottom"
8
9export type ScrollButtonProps = {
10 className?: string
11 variant?: VariantProps<typeof buttonVariants>["variant"]
12 size?: VariantProps<typeof buttonVariants>["size"]
13} & React.ButtonHTMLAttributes<HTMLButtonElement>
14
15function ScrollButton({
16 className,
17 variant = "outline",
18 size = "sm",
19 ...props
20}: ScrollButtonProps) {
21 const { isAtBottom, scrollToBottom } = useStickToBottomContext()
22
23 return (
24 <Button
25 variant={variant}
26 size={size}
27 className={cn(
28 "h-10 w-10 rounded-full transition-all duration-150 ease-out",
29 !isAtBottom
30 ? "translate-y-0 scale-100 opacity-100"
31 : "pointer-events-none translate-y-4 scale-95 opacity-0",
32 className
33 )}
34 onClick={() => scrollToBottom()}
35 {...props}
36 >
37 <ChevronDown className="h-5 w-5" />
38 </Button>
39 )
40}
41
42export { ScrollButton }

What it pulls in

npm packages

  • class-variance-authority
  • lucide-react

Other registry items

  • button

Files it writes

  • components/prompt-kit/scroll-button.tsx

Facts

Registry
prompt-kit
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on prompt-kit prompt-kit.com ibelick/prompt-kit on GitHub Raw registry item This item as JSON

More from prompt-kit

All 23 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Chain Of Thoughtchain-of-thoughtprompt-kitComponentsFree1 dep
Chat Containerchat-containerprompt-kitComponentsFree1 dep
Code Blockcode-blockprompt-kitComponentsFree1 dep
Feedback Barfeedback-barprompt-kitComponentsFree1 dep
File Uploadfile-uploadprompt-kitComponentsFreeno deps
Imageimageprompt-kitComponentsFreeno deps
Jsx Previewjsx-previewprompt-kitComponentsFree1 dep
Loaderloaderprompt-kitComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex