Skip to content

Commit

Permalink
Documents data-turbo-prefetch attribute in api reference (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzonjulian authored May 1, 2024
1 parent a54529d commit c397c31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions _source/reference/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The following data attributes can be applied to elements to customize Turbo's be
* `data-turbo-stream` specifies that a link or form can accept a Turbo Streams response. Turbo [automatically requests stream responses](/handbook/streams#streaming-from-http-responses) for form submissions with non-`GET` methods; `data-turbo-stream` allows Turbo Streams to be used with `GET` requests as well.
* `data-turbo-confirm` presents a confirm dialog with the given value. Can be used on `form` elements or links with `data-turbo-method`.
* `data-turbo-submits-with` specifies text to display when submitting a form. Can be used on `input` or `button` elements. While the form is submitting the text of the element will show the value of `data-turbo-submits-with`. After the submission, the original text will be restored. Useful for giving user feedback by showing a message like "Saving..." while an operation is in progress.
* `data-turbo-prefetch="false"` disables [prefetching links on hover](/handbook/drive#prefetching-links-on-hover)

## Automatically Added Attributes

Expand Down

0 comments on commit c397c31

Please sign in to comment.