Custom Javascript in AMP stories

385 views Asked by At

Are there any guidelines, tutorials for developers who wants to create custom JavaScript components inside amp stories? Amp documentation shows AMP script is not applicable for amp stories. Simple elements like button can not be used at all places (shows error in amp playground)

There are list of Amp components, but what if developer wants to create custom JavaScript feature or functionality?

For example - I want to create simple content which toggles on click of on/off switch. Also it should auto scroll when user taps on content.

With such restrictions what are the possible ways to create UI rich dynamic AMP stories assuming they are not available in AMP components

1

There are 1 answers

0
Pravin W On

This is not allowed within AMP's story format, detailed answer here -

https://github.com/ampproject/amphtml/issues/38373