BarefootJS Documentation

#Table of Contents

#1. [Introduction](./introduction.md)

  • What is BarefootJS?
  • Why BarefootJS?
  • Design Philosophy

#2. Getting Started

  • Installation
  • Quick Start (5-minute tutorial)
  • Project Structure

#3. [Core Concepts](./core-concepts.md)

  • Two-Phase Compilation
  • Signal-Based Reactivity
  • Hydration Model
  • The "use client" Directive

#4. [Reactivity](./reactivity.md)

#5. [Templates & Rendering](./rendering.md)

#6. [Components](./components.md)

  • Component Authoring — Server components, client components, and the compilation model
  • Props & Type Safety — Typing props, defaults, and rest spreading
  • Children & Slots — Children prop, the Slot component, and the asChild pattern
  • Context API — Sharing state with createContext / useContext
  • Portals — Rendering elements outside their parent DOM hierarchy

#7. [Adapters](./adapters.md)

#8. [Advanced](./advanced.md)


#Documentation Conventions

Throughout this documentation, code examples use switchable tabs for the following:

Adapter — Examples show output for your selected adapter:

  • Hono (default)
  • Go Template

Package Manager — Install commands match your toolchain:

  • npm (default)
  • bun
  • pnpm
  • yarn

These preferences persist across pages.

Note for non-JavaScript developers: Sections marked with 💡 provide brief explanations of JSX and TypeScript concepts for developers coming from Go, Python, or other backend languages.