OpenSourceUIOpenSourceUIOpensource UI
GitHub—
  1. Home
  2. Components
  3. Buttons
  4. Linen Tab
Back to ButtonsComponents / Buttons

Linen Tab

Free Buttons React component — LinenTabButton. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.

Woven linen tab with dashed stitch borders and a soft fold sheen — warm, editorial, and understated.

Preview

Setup

How to use

Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.

  1. 1

    Run in your terminal:

    $npm install clsx tailwind-merge lucide-react
  2. 2

    Copy lib/cn.ts below. Skip if you already have cn().

  3. 3

    Copy the code below and create components/buttons/linen-tab-button.tsx in your project.

  4. 4

    Import and render:

    Example

    import { LinenTabButton } from "@/components/buttons/linen-tab-button";

    <LinenTabButton>View details</LinenTabButton>

lib/cn.ts

1
2
3
4
5
6
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
 
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

components/buttons/linen-tab-button.tsx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"use client";
 
import {
forwardRef,
type ComponentPropsWithoutRef,
type ReactNode,
} from "react";
 
import { cn } from "@/lib/cn";
 
export type LinenTabButtonProps = Readonly<
{
children?: ReactNode;
} & ComponentPropsWithoutRef<"button">
>;
 
const LINEN_BODY =
"linear-gradient(180deg, #f8f4ee 0%, #ebe4d8 55%, #dfd6c8 100%)";
const LINEN_WEAVE =
"repeating-linear-gradient(90deg, rgba(120,113,108,0.04) 0 1px, transparent 1px 4px), repeating-linear-gradient(0deg, rgba(120,113,108,0.03) 0 1px, transparent 1px 5px)";
 
export const LinenTabButton = forwardRef<
HTMLButtonElement,
LinenTabButtonProps
>(
(
{
children = "View details",
className,
type = "button",
disabled,
...props
},
ref,
) => {
return (
<button
ref={ref}
type={type}
disabled={disabled}
data-slot="linen-tab-button"
className={cn(
"relative isolate overflow-hidden rounded-lg border border-[#d4cbc0] px-6 py-3 text-[1rem] ring-0 outline-none",
"font-sans font-medium tracking-tight text-neutral-800",
"shadow-[0_1px_0_rgba(255,255,255,0.85),0_6px_14px_rgba(120,113,108,0.16),inset_0_1px_0_rgba(255,255,255,0.65)]",
"transition-[transform,box-shadow,filter] duration-200 ease-out",
"hover:brightness-[1.02] active:translate-y-px active:brightness-[0.98]",
"motion-reduce:transition-none motion-reduce:hover:brightness-100 motion-reduce:active:translate-y-0",
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber-600",
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
style={{ background: LINEN_BODY }}
{...props}
>
<span
aria-hidden="true"
data-layer="linen-weave"
className="pointer-events-none absolute inset-0 opacity-80"
style={{ background: LINEN_WEAVE }}
/>
 
<span
aria-hidden="true"
data-layer="linen-stitch-top"
className="pointer-events-none absolute inset-x-3 top-1.5 border-t border-dashed border-[#c4b8aa]/80"
/>
<span
aria-hidden="true"
data-layer="linen-stitch-bottom"
className="pointer-events-none absolute inset-x-3 bottom-1.5 border-b border-dashed border-[#c4b8aa]/80"
/>
 
<span
aria-hidden="true"
data-layer="linen-fold"
className="pointer-events-none absolute inset-0"
style={{
background:
"linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 28%, rgba(87,83,78,0.05) 100%)",
}}
/>
 
<span data-layer="linen-label" className="relative z-1">
{children}
</span>
</button>
);
},
);
 
LinenTabButton.displayName = "LinenTabButton";
PreviousNext

On this

page

Jump to a section on this page.

  • lib/cn.ts
  • components/buttons/linen-tab-button.tsx
Platinum slotAvailable

Feature your product here.

Sticky card next to every component — highest-intent placement.

Claim this card