-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing a tabbed UI component #4771
Comments
Thanks @senthilp! Some thoughts on a couple possible ways to go with this: On one hand, it's almost like an On the other, it functions a little bit like a radio button, with a lasting state change based on click (and may either lend itself to an underlying implementation like this, or a more general approach built on this mechanic). |
I should add that at this time I'm not aware of a way to do this in AMP without a full-page refresh |
Currently not possible AFAIK. However tabs are essentially an accordion with grouping functionality where only one item in the group is ever expanded. Short term, we can consider adding grouping functionality to Long term, it may make sense to have a separate |
I definitely think we should just add |
@dvoytenko @rudygalfi Is the decision made to create a new component |
@senthilp At this point, the most likely path is a new |
@ericlindley-g is there a documentation on how to create a new component in AMP? We have made changes to an existing component but not created a new one. We want to evaluate the effort involved in creating |
We found the doc Building an AMP Extension. Will evaluate and update back. |
Hi @senthilp — I just wanted to follow up to make sure you have everything you need to evaluate an approach. We're happy to talk through some of our thoughts on this as needed. |
Glad to see Thanks @rudygalfi and @chenshay |
@joshcp If you have any additional examples, use-cases, or needs for the feature to share, it can help guide the plan for what to support. Thanks! |
@ericlindley-g,
|
@ericlindley-g @chenshay it would be great to have broad support for different types of content. For example, the ability to include a form for submitting product reviews. |
/cc @abeck000 |
Closing for ampproject/amp-by-example#559 |
One thing to keep in mind is if there is still any value in having a dedicated component even if this is technically possible by using other components (amp-selector in this case). We can evaluate based on the sample implementation. |
Is there a way to achieve tabbed UI with the current set of AMP components? We have UI like below
The content for all the tabs are already available in the initial markup. In non-AMP scenario we will just use JS to hide/show the tabs. How should we do it for AMP? One option is to do a full page refresh when users click on a tab, the resulting page will have the corresponding tab opened. Is there a way to do it without a full page refresh?
The text was updated successfully, but these errors were encountered: