Button Library · Signature
Dog-Ear
A sheet of paper whose corner folds further on hover.
States
Default
Hover
Active
Focus
Code
sig-dogear.html
<button class="btn-sig-dogear" type="button"> <span>Read more</span> </button>
sig-dogear.css
.btn-sig-dogear {
--btn-bg: #f4efe6;
--btn-fg: #26252c;
--btn-font: Georgia, serif;
--btn-size: 15px;
--btn-weight: 600;
--btn-px: 28px;
--btn-py: 11px;
--btn-w: auto;
--btn-h: auto;
--btn-bw: 0px;
--btn-line: #8b6cff;
--btn-radius: 0px;
--btn-shadow: none;
--btn-speed: 260ms;
}
.btn-sig-dogear {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5em;
box-sizing: border-box;
width: var(--btn-w);
height: var(--btn-h);
padding: var(--btn-py) var(--btn-px);
font-family: var(--btn-font);
font-size: var(--btn-size);
font-weight: var(--btn-weight);
line-height: 1.2;
color: var(--btn-fg);
background: var(--btn-bg);
border: var(--btn-bw) solid var(--btn-line);
border-radius: var(--btn-radius);
box-shadow: var(--btn-shadow);
cursor: pointer;
text-decoration: none;
white-space: nowrap;
transition: all var(--btn-speed) ease;
clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
padding-right: calc(var(--btn-px) + 12px);
}
.btn-sig-dogear:focus-visible {
outline: 2px solid var(--btn-fg);
outline-offset: -6px;
}
.btn-sig-dogear:disabled {
opacity: 0.5;
pointer-events: none;
}
.btn-sig-dogear__icon {
width: 1.15em;
height: 1.15em;
flex-shrink: 0;
}
.btn-sig-dogear:hover {
clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}
.btn-sig-dogear::before {
content: "";
position: absolute;
top: 0;
right: 0;
width: 14px;
height: 14px;
background: linear-gradient(225deg, transparent 50%, color-mix(in srgb, var(--btn-bg) 66%, #000) 50%);
border-bottom-left-radius: 5px;
transition: all var(--btn-speed) ease;
}
.btn-sig-dogear:hover::before {
width: 26px;
height: 26px;
}
@media (prefers-reduced-motion: reduce) {
.btn-sig-dogear,
.btn-sig-dogear::before {
animation: none !important;
transition: none !important;
}
}
sig-dogear.js
// No JavaScript needed: this one is CSS only.
sig-dogear.tsx
import type React from "react";
import "./sig-dogear.css"; // the CSS tab
export function BtnSigDogear({ children = "Read more", ...props }: React.ComponentProps<"button">) {
return (
<button className="btn-sig-dogear" type="button" {...props}>
<span>{children}</span>
</button>
);
}
sig-dogear.html
<button class="relative inline-flex items-center justify-center gap-[0.5em] [box-sizing:border-box] [padding:11px_28px] [font-family:Georgia,_serif] text-[15px] font-[600] [line-height:1.2] text-[#26252c] bg-[#f4efe6] [border:0px_solid_#8b6cff] rounded-[0px] [box-shadow:none] cursor-pointer no-underline whitespace-nowrap [transition:all_260ms_ease] [clip-path:polygon(0_0,_calc(100%_-_14px)_0,_100%_14px,_100%_100%,_0_100%)] [padding-right:calc(28px_+_12px)] focus-visible:[outline:2px_solid_#26252c] focus-visible:[outline-offset:-6px] disabled:[opacity:0.5] disabled:[pointer-events:none] hover:[clip-path:polygon(0_0,_calc(100%_-_26px)_0,_100%_26px,_100%_100%,_0_100%)] before:content-[''] before:absolute before:[top:0] before:[right:0] before:w-[14px] before:h-[14px] before:[background:linear-gradient(225deg,_transparent_50%,_color-mix(in_srgb,_#f4efe6_66%,_#000)_50%)] before:[border-bottom-left-radius:5px] before:[transition:all_260ms_ease] hover:before:w-[26px] hover:before:h-[26px] motion-reduce:[transition:none!important] motion-reduce:before:[transition:none!important]" type="button"> <span>Read more</span> </button>