# Ilha

> Ilha is a lightweight UI framework under 2,500 lines of code. Simple enough to fit in a single AI context window, powerful enough to build modern interfaces your way.

## Guide

### Start

- [Introduction](https://ilha.build/guide/getting-started/introduction): An introduction to ilha, a tiny isomorphic UI library with signal reactivity and no virtual DOM.
- [Installation](https://ilha.build/guide/getting-started/installation): Install ilha and start from official templates for Vite SPA and Oxide SPA.
- [Core concepts](https://ilha.build/guide/getting-started/core-concepts): components, atoms, JSX, mount, and renderToString.

### Build UI

- [Create component](https://ilha.build/guide/ui/create): Write a component — a function, async function, or generator that returns JSX.
- [State management](https://ilha.build/guide/ui/state): Declare reactive values with atom(), derive with Effect Atom.map and Atom.transform, and react with watch() or watch.once().
- [Context and errors](https://ilha.build/guide/ui/context-and-errors): Share atom-backed values with createContext, and catch subtree failures with ErrorBoundary.
- [Templating](https://ilha.build/guide/ui/templating): JSX, lowercase events, and lists from data.
- [Streams](https://ilha.build/guide/ui/streams): Paint Effect Streams of views, bridge atoms with Atom.toStream, and use when for per-emission generator bodies.
- [Render and hydrate](https://ilha.build/guide/ui/render): Render HTML with renderToString and activate it with mount.
- [Custom elements](https://ilha.build/guide/ui/custom-elements): Register a component as a custom element with define().

### Routing

- [Router overview](https://ilha.build/guide/routing/overview): File routes, SPA navigation, and optional Oxide SSR for ilha apps.
- [Routes and navigation](https://ilha.build/guide/routing/routes-and-navigation): Register routes, navigate between them, and read route state.
- [Error boundaries](https://ilha.build/guide/routing/error-boundaries): Catch render failures with +error.tsx boundaries, errorBoundary(), and wrapError().
- [File-system routing](https://ilha.build/guide/routing/file-system-routing): Generate routes from src/pages/ with the pages plugin.
- [Server islands](https://ilha.build/guide/routing/server-islands): Render selected components on the server with Oxide, frames, and oxidejs actions.
- [Middleware and security](https://ilha.build/guide/routing/middleware-and-security): Security headers, the deny-by-default frame guard, trusted origins, CSRF, and the production hardening model.
- [Deployment](https://ilha.build/guide/routing/deployment): Host a router app in production — oxidejs SSR middleware, static prerendering, and where to register guards.

### Integrations

- [Astro](https://ilha.build/guide/astro): Astro integration that renders and hydrates Ilha components as Astro islands.

### Recipes

- [Without JSX](https://ilha.build/guide/recipes/h): Build views with h() when you cannot use JSX.
- [Server state with PubSub](https://ilha.build/guide/recipes/pubsub-state): Fan out server-side state to every connected client with an Effect PubSub and a streaming action.
- [Test components](https://ilha.build/guide/recipes/testing): Render components in tests with renderToString, mount them with happy-dom, and assert updates.
- [View transitions](https://ilha.build/guide/recipes/view-transitions)
- [Oxlint plugin](https://ilha.build/guide/recipes/oxlint): Lint Ilha components for primitive placement, generator instructions, and event props that TypeScript cannot check.

### Resources

- [Showcase](https://ilha.build/guide/resources/showcase): A collection of websites and projects built with ilha.

## Reference

- [Core package reference](https://ilha.build/reference/ilha): Public exports from the ilha package.
- [Router reference](https://ilha.build/reference/router): Public exports from @ilha/router.
- [Astro reference](https://ilha.build/reference/astro): Public exports from @ilha/astro.

## Tutorial

### Build a counter

- [Tutorial: Atom](https://ilha.build/tutorial/counter/atom): Declare a count with atom() and show it in JSX.
- [Tutorial: Events](https://ilha.build/tutorial/counter/events): Increment a count with a plain onclick handler.
- [Tutorial: SSR](https://ilha.build/tutorial/counter/ssr): Render HTML with renderToString and hydrate with mount.

## Other

- [Ilha for Svelte Developers](https://ilha.build/blog/ilha-for-svelte-developers): A practical map from Svelte $state, $derived, and $effect to ilha atoms and Effect derived atoms.
- [Client-only SPA with Oxide actions](https://ilha.build/guide/routing/client-spa): Serve a static SPA shell, render frames on demand, and drop SSR guards you do not need.

## RSS Feeds

- [Ilha — Blog](https://ilha.build/blog/rss.xml)

## Agent resources

- [llms-full.txt](https://ilha.build/llms-full.txt): The full Markdown of every page in one file.
- [Page Markdown](https://ilha.build/index.md): Append `.md` to any page URL to fetch that page as raw Markdown.
- [JSON API](https://ilha.build/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://ilha.build/openapi.json.
- [Agent skills](https://ilha.build/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes.
- [API catalog](https://ilha.build/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here.
- [AI catalog](https://ilha.build/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs).
- [agent-readability.json](https://ilha.build/agent-readability.json): Manifest of every agent-facing artifact on this site.
- [Sitemap](https://ilha.build/sitemap.xml): Every indexable page URL with its last-modified date.
