Section
Prompt Library — Vercel
Refined dark monochrome prompt gallery with hairline borders, generous spacing, and a single teal accent. Includes category filter chips (Writing, Code, Analysis, Image), live search, and a working copy-to-clipboard button on every card that flips to a checkmark 'Copied!' state.
- Section
- Tailwind
- HTML
- MIT
Preview
Live section
9:41 100%
devsnips.dev/library/tailwind/sections/ai-product/prompt-library/vercel/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Sections/AI-Product/prompt-library/vercel Tailwind/Sections/AI-Product/prompt-library/vercel <!--
Snippet Name: Prompt Library — Vercel
Description: Refined dark monochrome prompt gallery with hairline borders, category filter chips, live search, and a working copy-to-clipboard button per card.
Author: DevSnips Contributors
Usage Example: Drop into a dark product shell as a prompt template gallery. Filter chips, search, and copy buttons are fully wired in preview.html.
-->
<div class="relative w-full" data-promptlib="vc">
<!-- Panel -->
<div class="overflow-hidden rounded-[14px] border border-white/10 bg-[#0a0a0a] shadow-[0_0_0_1px_rgba(255,255,255,0.02),0_20px_60px_-20px_rgba(0,0,0,0.9)]">
<!-- Header -->
<div class="flex flex-wrap items-center justify-between gap-3 border-b border-white/[0.07] px-5 py-4">
<div class="flex items-center gap-3">
<div class="flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 bg-white text-black">
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M4 4h11l5 5v11H4z" /><path d="M15 4v5h5" /><path d="M8 12h8M8 16h5" /></svg>
</div>
<div class="leading-tight">
<p class="font-g text-[14px] font-medium text-white">Prompt Library</p>
<p class="vc-mono mt-0.5 text-[11px] text-white/40">
<span class="vc-dot"></span><span data-count>9</span> templates · copy-ready
</p>
</div>
</div>
<div class="relative flex items-center">
<svg class="pointer-events-none absolute left-3 h-3.5 w-3.5 text-white/30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="11" cy="11" r="7" /><path d="M21 21l-4-4" /></svg>
<input
type="search"
name="q"
placeholder="Search prompts…"
aria-label="Search prompts"
class="w-44 rounded-lg border border-white/10 bg-white/[0.03] py-2 pl-9 pr-3 font-g text-[13px] text-white placeholder:text-white/30 focus:border-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/20 sm:w-64"
data-search
/>
</div>
</div>
<!-- Filter chips -->
<div class="flex flex-wrap gap-2 border-b border-white/[0.07] px-5 py-3.5" role="tablist" aria-label="Filter prompts by category" data-filters>
<button type="button" role="tab" aria-selected="true" data-filter="all" class="filter-chip vc-mono inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white px-3 py-1.5 text-[11px] font-medium text-black transition-colors hover:bg-white/90 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30">All</button>
<button type="button" role="tab" aria-selected="false" data-filter="writing" class="filter-chip vc-mono inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[11px] font-medium text-white/60 transition-colors hover:border-white/20 hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30">Writing</button>
<button type="button" role="tab" aria-selected="false" data-filter="code" class="filter-chip vc-mono inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[11px] font-medium text-white/60 transition-colors hover:border-white/20 hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30">Code</button>
<button type="button" role="tab" aria-selected="false" data-filter="analysis" class="filter-chip vc-mono inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[11px] font-medium text-white/60 transition-colors hover:border-white/20 hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30">Analysis</button>
<button type="button" role="tab" aria-selected="false" data-filter="image" class="filter-chip vc-mono inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[11px] font-medium text-white/60 transition-colors hover:border-white/20 hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30">Image</button>
</div>
<!-- Grid -->
<div class="grid grid-cols-1 gap-px bg-white/[0.07] sm:grid-cols-2 lg:grid-cols-3" data-grid>
<!-- Card: Writing -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="writing">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Writing</span>
<span class="vc-mono text-[10px] text-white/30">#01</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Cold Email Hook</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Craft a punchy first sentence that earns a reply within three seconds.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Write a cold email opening line for {{product}} targeting {{role}}. One sentence, curiosity-driven, no more than 12 words. Avoid hype words.">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Code -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="code">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Code</span>
<span class="vc-mono text-[10px] text-white/30">#02</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Code Reviewer</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Review a function for bugs, edge cases, and readability — list issues by severity.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Review the following code for bugs, security, and readability. Report findings as a list grouped by severity (critical / warning / nit). Suggest concrete fixes with code snippets. CODE: {{code}}">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Analysis -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="analysis">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Analysis</span>
<span class="vc-mono text-[10px] text-white/30">#03</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Data Summarizer</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Extract three key insights, a trend, and one risk from raw data.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Summarize the following data. Output: 3 key insights (bullet), 1 trend with direction, 1 risk to watch. Keep each item under 25 words. DATA: {{data}}">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Image -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="image">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Image</span>
<span class="vc-mono text-[10px] text-white/30">#04</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Product Hero Shot</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Cinematic product photography prompt with lighting, lens, and mood baked in.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Cinematic product photo of {{product}} on a textured stone surface, soft rim light, 85mm lens, shallow depth of field, warm golden hour glow, high detail, 4k, no text.">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Writing -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="writing">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Writing</span>
<span class="vc-mono text-[10px] text-white/30">#05</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Blog Post Outline</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Generate a structured outline with H2/H3 hierarchy and a hook intro.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Create a blog post outline for {{topic}} aimed at {{audience}}. Structure: H2 sections with H3 sub-points, a hook intro, and a CTA. Keep each H3 to one sentence.">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Code -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="code">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Code</span>
<span class="vc-mono text-[10px] text-white/30">#06</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">SQL Optimizer</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Diagnose a slow query, suggest indexes, and rewrite for performance.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Analyze the following SQL for performance. Output: (1) what is slow and why, (2) indexes to add, (3) a rewritten query. Note the dialect. SQL: {{sql}}">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Analysis -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="analysis">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Analysis</span>
<span class="vc-mono text-[10px] text-white/30">#07</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Sentiment Analyzer</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Classify sentiment per message with confidence scores and a summary.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Classify sentiment for each message as positive / neutral / negative with a confidence 0-1. End with a one-line aggregate summary. MESSAGES: {{messages}}">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Image -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="image">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Image</span>
<span class="vc-mono text-[10px] text-white/30">#08</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Logo Concept</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Minimal geometric logo prompt — mark, palette, and negative space.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Minimal geometric logo for {{brand}}, single mark, strong negative space, two-color palette, flat vector, centered, on white, no text.">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
<!-- Card: Code -->
<article class="prompt-card group flex flex-col bg-[#0a0a0a] p-4 transition-colors hover:bg-white/[0.03]" data-category="code">
<div class="flex items-center justify-between gap-2">
<span class="vc-mono rounded-md border border-white/10 bg-white/[0.05] px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-white/70">Code</span>
<span class="vc-mono text-[10px] text-white/30">#09</span>
</div>
<h3 class="mt-3 font-g text-[15px] font-medium leading-tight text-white">Refactor to Hooks</h3>
<p class="mt-2 flex-1 font-g text-[13px] leading-relaxed text-white/50">Convert a class component to idiomatic React hooks with tests.</p>
<button type="button" class="copy-btn mt-4 inline-flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/[0.04] px-3 py-2 vc-mono text-[11px] text-white/80 transition-colors hover:border-white/20 hover:bg-white/[0.08] hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/30" data-prompt="Refactor this React class component to hooks. Preserve behavior, split into small effects, and add a unit test for the main case. CODE: {{code}}">
<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>
<span class="copy-label">Copy</span>
</button>
</article>
</div>
<!-- Empty state -->
<div class="hidden border-t border-white/[0.07] px-5 py-10 text-center" data-empty>
<p class="font-g text-[14px] font-medium text-white/60">No prompts match that filter.</p>
<p class="vc-mono mt-1 text-[11px] text-white/30">Try a different category or search term.</p>
</div>
<!-- Footer -->
<div class="flex items-center justify-between gap-2 border-t border-white/[0.07] px-5 py-3">
<p class="vc-mono text-[11px] text-white/30">// click copy to grab the prompt</p>
<p class="vc-mono text-[11px] text-white/40"><span data-visible-count>9</span> shown</p>
</div>
</div>
<style>
[data-promptlib="vc"] .vc-mono { font-family: 'Geist Mono', ui-monospace, monospace; }
[data-promptlib="vc"] .font-g { font-family: 'Geist', sans-serif; }
[data-promptlib="vc"] .vc-dot { display: inline-block; height: 6px; width: 6px; border-radius: 9999px; background: #50e3c2; margin-right: 5px; box-shadow: 0 0 8px #50e3c2; vertical-align: middle; }
[data-promptlib="vc"] .copy-icon-check { display: none; }
</style>
<script>
(function () {
var root = document.currentScript.closest('[data-promptlib="vc"]');
if (!root) return;
var filters = root.querySelector('[data-filters]');
var search = root.querySelector('[data-search]');
var empty = root.querySelector('[data-empty]');
var visibleCount = root.querySelector('[data-visible-count]');
var cards = Array.prototype.slice.call(root.querySelectorAll('.prompt-card'));
var current = 'all';
function apply() {
var q = (search && search.value || '').toLowerCase().trim();
var shown = 0;
cards.forEach(function (card) {
var cat = card.getAttribute('data-category');
var text = (card.textContent || '').toLowerCase();
var matchCat = current === 'all' || cat === current;
var matchQ = !q || text.indexOf(q) !== -1;
var show = matchCat && matchQ;
card.style.display = show ? '' : 'none';
if (show) shown++;
});
if (empty) empty.classList.toggle('hidden', shown !== 0);
if (visibleCount) visibleCount.textContent = String(shown);
}
filters.addEventListener('click', function (e) {
var btn = e.target.closest('[data-filter]');
if (!btn) return;
current = btn.getAttribute('data-filter');
Array.prototype.forEach.call(filters.querySelectorAll('.filter-chip'), function (c) {
var on = c === btn;
c.setAttribute('aria-selected', on ? 'true' : 'false');
if (on) {
c.classList.add('bg-white', 'text-black');
c.classList.remove('bg-white/[0.03]', 'text-white/60');
} else {
c.classList.remove('bg-white', 'text-black');
c.classList.add('bg-white/[0.03]', 'text-white/60');
}
});
apply();
});
if (search) search.addEventListener('input', apply);
var checkSVG = '<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true"><path d="M20 6L9 17l-5-5" /></svg>';
function flash(btn) {
var label = btn.querySelector('.copy-label');
var icon = btn.querySelector('.copy-icon');
var prevLabel = label ? label.textContent : '';
if (label) label.textContent = 'Copied!';
if (icon) { var tmp = document.createElement('span'); tmp.innerHTML = checkSVG; icon.replaceWith(tmp.firstChild); }
btn.classList.add('border-[#50e3c2]/40', 'text-[#50e3c2]');
setTimeout(function () {
if (label) label.textContent = prevLabel || 'Copy';
var cur = btn.querySelector('.copy-icon');
if (cur) { var tmp2 = document.createElement('span'); tmp2.innerHTML = '<svg class="copy-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2" /><path d="M5 15V5h10" /></svg>'; cur.replaceWith(tmp2.firstChild); }
btn.classList.remove('border-[#50e3c2]/40', 'text-[#50e3c2]');
}, 1200);
}
function copyText(text, btn) {
function done() { flash(btn); }
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(done, function () { fallbackCopy(text); done(); });
} else {
fallbackCopy(text); done();
}
}
function fallbackCopy(text) {
var ta = document.createElement('textarea');
ta.value = text; ta.setAttribute('readonly', '');
ta.style.position = 'absolute'; ta.style.left = '-9999px';
document.body.appendChild(ta); ta.select();
try { document.execCommand('copy'); } catch (e) {}
document.body.removeChild(ta);
}
root.addEventListener('click', function (e) {
var btn = e.target.closest('.copy-btn');
if (!btn) return;
copyText(btn.getAttribute('data-prompt') || '', btn);
});
})();
</script>
</div> 287 lines UTF-8 · LF · Spaces: 2
Continue browsing