From zero to beautiful documents in 5 minutes
# Global installation
npm install -g taildown
# Or use npx
npx taildown compile document.td
# Clone the repository
git clone https://github.com/vincitamore/taildown.git
cd taildown
# Install dependencies
pnpm install
# Build all packages
pnpm build
pnpm install
in the extracted directorypnpm build
to compile packagesCreate 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}
:::
pnpm taildown compile my-first-document.td
This creates:
my-first-document.html
- Self-contained HTML with embedded CSS and JavaScriptpnpm taildown compile my-first-document.td --separate
This creates:
my-first-document.html
- HTML filemy-first-document.css
- Separate CSS filepnpm taildown compile my-first-document.td -o output/index.html --css output/styles.css
<!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>
.dark
class:root {
--primary: #3b82f6;
--background: #ffffff;
}
.dark {
--background: #030712;
}
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:
xs
, small
, large
, xl
, 2xl
, huge
, massive
primary
, secondary
, accent
, success
, warning
, error
, muted
thin
, light
, normal
, semibold
, bold
rounded
, shadow
, elevated
, glass
Use the :icon[]
syntax for Lucide icons:
:icon[heart]{primary} Love this feature
:icon[check-circle]{success large} Completed
:icon[arrow-right] Next step
Popular icons:
home
, menu
, search
, settings
, user
check
, x
, plus
, edit
, trash
github
, twitter
, linkedin
heart
, star
, bookmark
, share
Use :::component
syntax for component blocks:
:::card {elevated hover-lift}
## Card Title {large-bold}
Card content with automatic styling.
[Button Text](#){button primary}
:::
Built-in components:
card
, container
, grid
tabs
, accordion
, carousel
, modal
, tooltip
alert
, button
, badge
, avatar
Add frosted glass effects:
:::card {subtle-glass}
Light frosted glass (90% transparency)
:::
:::card {light-glass}
Medium frosted glass (75% transparency)
:::
:::card {heavy-glass}
Heavy frosted glass (60% transparency)
:::
All glass effects include:
Every Taildown document includes dark mode by default:
Features:
How it works:
prefers-color-scheme
)CSS Variables:
:root {
--background: #ffffff;
--foreground: #111827;
--primary: #3b82f6;
}
.dark {
--background: #030712;
--foreground: #f9fafb;
--primary: #3b82f6;
}
All components automatically adapt to dark mode!
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!