Hotwire Turbo
Estimated reading time: less than 1 minuteKita Html provides type definitions for Hotwire Turbo
elements and attributes. Once enabled, <turbo-frame> and <turbo-stream> elements are
available as valid JSX with typed attributes.
Setup
Create a src/kita.d.ts file in your project and add the triple-slash directive. If you
already have this file for another type extension, append the new directive to it.
src/kita.d.ts
Or enable it globally in tsconfig.json:
tsconfig.json
Usage
Turbo Frames for partial page updates:
Turbo Streams for targeted DOM mutations:
Turbo Drive attributes for controlling navigation behavior are also typed on standard HTML elements.