BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/pixel-perfect/bevel-button

bevel-button

pixel-perfect/bevel-button
FreeBlock

Compact dark button with a top-light to bottom-dark gradient stroke and layered inset bevel shadows for a tactile chiseled feel.

Install it

npx shadcn@latest add https://www.pixel-perfect.space/r/bevel-button.json

Source

registry/new-york/buttons/bevel-button.tsxwww.pixel-perfect.space/r/bevel-button.json
1"use client";
2import React, { useEffect } from "react";
3import { cn } from "@/lib/utils";
4
5interface BevelButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6 speedMs?: number;
7}
8
9const PROPERTY_CSS = `
10@property --bevel-angle {
11 syntax: '<angle>';
12 initial-value: 180deg;
13 inherits: false;
14}
15@keyframes bevel-button-spin {
16 to { --bevel-angle: 540deg; }
17}
18`;
19
20let propertyStyleInjected = false;
21const injectPropertyStyles = () => {
22 if (typeof document === "undefined" || propertyStyleInjected) return;
23 propertyStyleInjected = true;
24 const style = document.createElement("style");
25 style.setAttribute("data-bevel-button", "");
26 style.textContent = PROPERTY_CSS;
27 document.head.appendChild(style);
28};
29
30const BevelButton = React.forwardRef<HTMLButtonElement, BevelButtonProps>(
31 ({ className, children, speedMs = 3000, style, ...props }, ref) => {
32 useEffect(() => {
33 injectPropertyStyles();
34 }, []);
35
36 return (
37 <button
38 ref={ref}
39 className={cn(
40 "relative inline-flex items-center justify-center rounded-[8px] border border-solid border-transparent px-[10px] py-[10px] text-[12px] font-normal leading-none text-white outline-none transition-transform active:scale-[0.98]",
41 className,
42 )}
43 style={{
44 fontFamily:
45 '"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif',
46 background:
47 "linear-gradient(#2d2d2d, #2d2d2d) padding-box, linear-gradient(var(--bevel-angle, 180deg), rgba(255,255,255,0.65) 0%, rgba(255,255,255,0.08) 38%, rgba(0,0,0,1) 100%) border-box",
48 boxShadow:
49 "inset 0px -2px 2.6px 0px rgba(0,0,0,0.57), inset 0px 1px 1.7px 0px rgba(255,255,255,0.25)",
50 animation: `bevel-button-spin ${speedMs}ms linear infinite`,
51 ...style,
52 }}
53 {...props}
54 >
55 {children ?? "Hello Button :)"}
56 </button>
57 );
58 },
59);
60
61BevelButton.displayName = "BevelButton";
62
63export default BevelButton;

Files it writes

  • registry/new-york/buttons/bevel-button.tsx

Facts

Registry
pixel-perfect
Type
registry:block
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

www.pixel-perfect.space DhruvitNavadiya/portfolio-new on GitHub Raw registry item This item as JSON

More from pixel-perfect

All 60 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
3d-button3d-buttonpixel-perfectBlocksUnverified2 deps
abhinav-bento-buttonabhinav-bento-buttonpixel-perfectBlocksUnverifiedno deps
accordion-carouselaccordion-carouselpixel-perfectBlocksFree1 dep
accordion-foldaccordion-foldpixel-perfectBlocksFree1 dep
activity-wheel-motionactivity-wheel-motionpixel-perfectBlocksFree2 deps
animated-textureanimated-texturepixel-perfectBlocksFree1 dep
aperture-mask-revealaperture-mask-revealpixel-perfectBlocksFree1 dep
aurora-curtainaurora-curtainpixel-perfectBlocksFreeno 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