API REFERENCE

Template

The HTML template component is a simple component that allows you to define the base structure of your html content inside your application.

This file is required and has to be defined into the src folder.

Usage

TypeScript
JavaScript
src/template.tsx
tsximport { TemplateProps } from "rasengan"; export default function Template({ Head, Body, Script }: TemplateProps) { return ( <html lang="en"> <Head> <meta charSet="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> </Head> <Body> <Script /> </Body> </html> ) }

Props

The Template component has the following properties:

  • Head: The head of the component. It's used to define the head of the html document.
  • Body: The body of the component. It's used to define the body of the html document.
  • Script: The script of the component. It's used to define the script of the html document.
Component
Layout Component