---
title: Jaspr API Reference
description: API Reference for the Jaspr Web Framework.
---

---

This is the API reference documentation for the Jaspr Web Framework. It provides a comprehensive overview of the most important components and utilities available in the framework.

<Warning>
This is not the complete API reference. For a complete reference, please refer to the generated [API Reference](https://pub.dev/documentation/jaspr/latest/jaspr/) on pub.dev.
</Warning>

---

This documentation is split into the sections:

## Components

<Property name="Document" type="Component">
  The Document component sets up and controls the basic document structure.

  [Read Docs](/api/components/document)
</Property>

---

<Property name="RawText" type="Component">
  Renders raw HTML from a String.

  [Read Docs](/api/components/raw_text)
</Property>

---

<Property name="AsyncBuilder" type="Component">
  Server-side components with an async build method.

  [Read Docs](/api/components/async_components)
</Property>

---

<Property name="AsyncStatelessComponent" type="Component">
  Server-side components with an async build method.

  [Read Docs](/api/components/async_components)
</Property>

---

<Property name="Router" type="Component">
  Handles routing between different pages both server- and client-side.

  [Read Docs](/api/components/router)
</Property>

---

<Property name="Link" type="Component">
  Handles any kind of link.

  [Read Docs](/api/components/link)
</Property>

---

<Property name="Style" type="Component">
  Renders the provided StyleRules into css and wraps them with a `<style>` element.

  [Read Docs](/api/components/style)
</Property>

---

<Property name="FlutterEmbedView" type="Component">
  Embed a flutter app in your Jaspr site.

  [Read Docs](/api/components/flutter_embed_view)
</Property>

---

<Property name="JasprBadge" type="Component">
  Displays a "Built with Jaspr" badge.

  [Read Docs](/api/components/jaspr_badge)
</Property>

---

## General

<Property name="runApp" type="Function">
  Runs your Jaspr site on either the server or the client.

  [Read Docs](/api/utils/run_app)
</Property>

---

<Property name="Styles" type="Class">
  Type-safe Dart bindings of CSS properties.

  [Read Docs](/api/utils/styles)
</Property>

---

<Property name="@css / css()" type="Annotation / Function">
  Styling utility to write nested style rules.

  [Read Docs](/api/utils/at_css)
</Property>

---

<Property name="events()" type="Function">
  Type-safe event bindings for HTML components.

  [Read Docs](/api/utils/events)
</Property>

---

<Property name="GlobalNodeKey" type="Class">
  Get access to the underlying DOM node of a component.

  [Read Docs](/api/utils/global_node_key)
</Property>

---

<Property name="ViewTransitionMixin" type="Mixin">
  Easily transition between ui states with View Transitions.

  [Read Docs](/api/utils/view_transition_mixin)
</Property>

---

## Server / Client

<Property name="@client" type="Annotation">
  With the @client annotation you can automatically hydrate selected components on the client.

  [Read Docs](/api/utils/at_client)
</Property>

---

<Property name="@encoder / @decoder" type="Annotation">
  Setup encoding and decoding for custom data types.

  [Read Docs](/api/utils/at_encoder_decoder)
</Property>

---

<Property name="@Import" type="Annotation">
  How to import platform-specific libraries in shared components.

  [Read Docs](/api/utils/at_import)
</Property>

---

<Property name="@sync" type="Annotation">
  Easy data synchronization with support for custom data types.

  [Read Docs](/api/utils/at_sync)
</Property>

---

<Property name="SyncStateMixin" type="Mixin">
  Syncing the state of a StatefulComponent from server to client.

  [Read Docs](/api/utils/sync_state_mixin)
</Property>

---

<Property name="PreloadStateMixin" type="Mixin">
  Asynchronously preloading the state of a StatefulComponent on the server.

  [Read Docs](/api/utils/preload_state_mixin)
</Property>

---

<Property name="headers / setHeader()" type="Accessor / Function">
  Access request headers and set response headers.

  [Read Docs](/api/utils/headers)
</Property>

---

<Property name="cookies / setCookie()" type="Accessor / Function">
  Access request cookies and set response cookies.

  [Read Docs](/api/utils/cookies)
</Property>

---

<Property name="setStatusCode()" type="Function">
  Set the response status code and body.

  [Read Docs](/api/utils/set_status_code)
</Property>