Discover Tairu
Tairu is a framework for Tiles: server-defined user interfaces that are uniquely identified by their URLs and can be displayed and interacted with from many different clients.
Tiles can be created using a few primitive components, using the @tairu/handler
package and either writing the JSON structure directly or a JSX template abstraction:
- Using JSON
- Using JSX elements
import { handle } from '@tairu/handler'
export default handle(() => {
return {
type: "Tile",
version: "0.1",
props: {
title: "Demo tile",
children: [
{ type: "Text", props: { children: ["Hello Tairu!"] } }
]
}
}
})
import { Tile, Text, handle } from '@tairu/handler'
export default handle(() => {
return (
<Tile title="Demo tile">
<Text>Hello Tairu!</Text>
</Tile>
)
})