WhatIsThatBook uses a vintage bookshop aesthetic — warm, nostalgic, and inviting. The design evokes the feeling of browsing dusty shelves in a cozy indie bookstore and discovering forgotten treasures.
All colors are defined as CSS variables in src/app.css using OKLCH color space:
| Variable | Hex Approx | Usage |
|---|---|---|
--book-cream |
#faf7f2 |
Primary background |
--book-paper |
#f5f0e6 |
Card backgrounds, secondary surfaces |
--book-ink |
#2d2319 |
Primary text |
--book-ink-light |
#5c4a3d |
Secondary text |
--book-ink-muted |
#8a7d72 |
Muted text, hints, placeholders |
--book-spine |
#8b3a3a |
Primary accent (burgundy), CTAs |
--book-spine-hover |
#6d2d2d |
Hover states for primary buttons |
--book-gold |
#b8860b |
Highlights, ratings, decorative |
--book-sage |
#6b8e6b |
Success states, match indicators |
--book-rust |
#a65d3f |
Secondary accent |
--book-border |
— | Warm border color |
| Variable | Value | Usage |
|---|---|---|
--font-display |
'Playfair Display', Georgia, serif |
Headlines, book titles |
--font-body |
'Source Serif 4', Georgia, serif |
Body text, descriptions |
--font-ui |
'DM Sans', system-ui, sans-serif |
Buttons, labels, small text |
Utility classes:
.font-display— Display/headline typography.font-body— Body text typography.font-ui— UI element typography.book-title— Elegant serif with tight tracking for titles.book-body— Readable serif for body content.book-ui— Clean sans-serif for UI elements.book-muted— Muted text style.book-quote— Italic serif for quotes/inspirations
IMPORTANT: When adding new shadcn components, always add book variants to maintain design consistency. See existing components for reference.
<script>
import { Button } from '$lib/components/ui/button';
</script>
<!-- Primary action (burgundy) -->
<Button variant="book">Find My Book</Button>
<!-- Secondary action (outlined) -->
<Button variant="book-outline">View Details</Button>
<!-- Tertiary action (ghost) -->
<Button variant="book-ghost">Cancel</Button>
<!-- Special highlight (gold) -->
<Button variant="book-gold">Premium Feature</Button><script>
import * as Card from '$lib/components/ui/card';
</script>
<!-- Standard book card -->
<Card.Root variant="book">Card content</Card.Root>
<!-- Card with hover lift effect (for interactive cards) -->
<Card.Root variant="book-hover">Interactive card content</Card.Root><script>
import { Input } from '$lib/components/ui/input';
</script>
<!-- Book-styled input -->
<Input variant="book" placeholder="Search..." />When installing a new shadcn component:
- Install the component:
bunx shadcn-svelte@latest add [component] - Add
bookvariant(s) usingtailwind-variants(tv) - Export the variant type and variants function from the index file
- Document the new variants in this file
Example pattern for adding variants:
<script lang="ts" module>
import { type VariantProps, tv } from 'tailwind-variants';
export const componentVariants = tv({
base: '/* base styles */',
variants: {
variant: {
default: '/* default styles */',
book: 'bg-book-paper border-book-border text-book-ink /* book theme styles */'
}
},
defaultVariants: {
variant: 'default'
}
});
export type ComponentVariant = VariantProps<typeof componentVariants>['variant'];
</script><!-- Ornamental divider -->
<div class="book-divider">
<span class="text-book-gold">✦</span>
</div><!-- Background with subtle texture -->
<div class="book-surface rounded-xl p-6">Background section</div>| Symbol | Usage |
|---|---|
✦ |
Section dividers, footer |
❧ |
Alternative divider |
"" |
Quotation styling |
★ |
Ratings (gold color) |
Utility classes:
.animate-fade-in-up— Fade in from below (0.5s).animate-fade-in— Simple fade in (0.4s).animate-scale-in— Scale up from 95% (0.3s)
Stagger delays:
.delay-100through.delay-500— For staggered animations
Example usage:
<div class="animate-fade-in-up opacity-0">First element</div>
<div class="animate-fade-in-up opacity-0 delay-100">Second element (100ms delay)</div><div class="mb-16 text-center">
<div class="book-divider mx-auto mb-6 max-w-xs">
<span class="text-book-gold">✦</span>
</div>
<h2 class="book-title mb-4 text-3xl text-book-ink md:text-4xl">Section Title</h2>
<p class="book-body mx-auto max-w-2xl text-lg text-book-ink-light">Section description text</p>
</div><Card.Root variant="book-hover" class="group relative p-6">
<!-- Decorative quote mark -->
<div class="font-display absolute -top-2 -left-1 text-6xl text-book-gold/20 select-none">"</div>
<blockquote class="relative">
<p class="book-quote text-book-ink-light">Quote text here...</p>
</blockquote>
<div class="mt-4">
<span class="book-ui rounded-full bg-book-spine/10 px-3 py-1 text-xs text-book-spine">
Category
</span>
</div>
</Card.Root>- Use
Card.Root variant="book-hover"for interactive cards - Cover images with spine shadow effect
- Serif font for book titles (
.book-title) - Gold stars for ratings (
text-book-gold) - Sage green for match percentage badges
Use Lucide icons from @lucide/svelte:
BookOpen— Book-related actionsSearch— Search functionalityExternalLink— External linksSparkles— AI/magic featuresCheckCircle— Success/completion
Dark mode variables are defined in src/app.css under the .dark class. The palette inverts to warm dark tones while maintaining the vintage aesthetic.
- Maintain WCAG 2.1 AA contrast ratios
- Use
book-inkonbook-cream/paperfor sufficient contrast - Focus states use
--book-goldring color - Interactive elements have clear hover/focus states
Use warm, book-related vocabulary:
- "Find" instead of "search"
- "Discover" instead of "results"
- "Remember" instead of "recall"
- "Forgotten favorites" for rediscovered books
- "Book lovers" for users