Skip to content
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

Feature request: Tabs #1

Closed
pjebs opened this issue May 28, 2020 · 6 comments
Closed

Feature request: Tabs #1

pjebs opened this issue May 28, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@pjebs
Copy link

pjebs commented May 28, 2020

It would be great if pico had tabs, where each tab reveals some different content.

@lucaslarroche
Copy link
Member

Pico try to use only natives HTML elements.
At the moment, I don't want to add specific components that require new .classes.

What could be the HTML structure of such a component?

The accordion component is the one that most closely resembles your request:
https://picocss.com/docs/#accordions

Actually, with the same HTML structure, and still without Javascript, it's possible to create a tabs component.

I preferred to style <details> as an accordion rather than tabs because it's more easily compatible on mobile.

@pjebs
Copy link
Author

pjebs commented Jul 9, 2020

Tabs are essential. Even the "Write Comment" section in github issues (which I am writing right now) uses tabs.

@lucaslarroche
Copy link
Member

Yes, tabs are definitely useful.
But this would require .classes and maybe javascript. Not really in the "pure semantic HTML" spirit.

I like this tabs integrations: Tabsy CSS, Pure CSS tabs, Responsive pure CSS tabs & accordion
It is easily adaptable.

I'm open to Pull Requests as long as the new tab feature is an optional component and is disabled in classless mode.

@pjebs
Copy link
Author

pjebs commented Jul 13, 2020

I don't know enough JavaScript

@lucaslarroche lucaslarroche added the enhancement New feature or request label Oct 27, 2020
@DavidSouther
Copy link
Contributor

There are aria roles for tablist, tab, and tabpanel, which would let Pico do classless tabs.

lucaslarroche pushed a commit that referenced this issue Sep 11, 2022
support tooltip directions with placement property
@dsentker
Copy link

Missing tabs are the only component that stops me from using picocss. There is a classless option with role=tablist. The disadvantage is that it requires Javascript, which was no obstacle for the picocss dialog.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tablist_role

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants