Getting Started with Taildown

From zero to beautiful documents in 5 minutes


Installation

# Global installation
npm install -g taildown

# Or use npx
npx taildown compile document.td

Your First Document

Create a file named my-first-document.td:

# Hello World {huge-bold center primary}

Welcome to Taildown! {large muted center}

:::card {light-glass slide-up}
## Your First Card {medium-bold}

This is a card with glassmorphism and a slide-up animation!

- :icon[check]{success} Beautiful by default
- :icon[check]{success} No configuration needed
- :icon[check]{success} Dark mode included

[Learn More](#){button primary}
:::

Compile Your Document

Basic Compilation

pnpm taildown compile my-first-document.td

This creates:

Separate CSS File

pnpm taildown compile my-first-document.td --separate

This creates:

Custom Output

pnpm taildown compile my-first-document.td -o output/index.html --css output/styles.css

Understanding the Output

HTML Output

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>/* CSS here */</style>
</head>
<body>
  <!-- Your content -->
  <script>/* JS here */</script>
</body>
</html>

CSS Output

:root {
  --primary: #3b82f6;
  --background: #ffffff;
}

.dark {
  --background: #030712;
}

Basic Syntax Overview

Use natural language for styling:

# Large Bold Primary Heading {huge-bold primary center}

This paragraph has muted text and relaxed line spacing. {large muted relaxed-lines}

[Click Me](#){button primary large hover-lift}

Common shorthands:


Dark Mode Guide

Dark Mode is Automatic

Every Taildown document includes dark mode by default:

Features:

How it works:

  1. First Visit: Detects system dark mode preference (prefers-color-scheme)
  2. Toggle: Click the moon/sun button to switch themes
  3. Persistence: Your choice is saved to localStorage
  4. Consistency: Same theme on all future visits

CSS Variables:

:root {
  --background: #ffffff;
  --foreground: #111827;
  --primary: #3b82f6;
}

.dark {
  --background: #030712;
  --foreground: #f9fafb;
  --primary: #3b82f6;
}

All components automatically adapt to dark mode!


Next Steps

Syntax Guide

Deep dive into Taildown syntax and capabilities.

Read Guide

Plain English

Complete reference of all styling shorthands.

View Reference

Components

Explore all 18+ built-in components.

Browse Components


You're ready to start! Create your first document and see the magic happen. Remember, dark mode works automatically - just try clicking the toggle button!

Back to Home