Help Provision: Tab with content (just in case) #1260
Mashiane
started this conversation in
Show and tell
Replies: 1 comment
-
Thank you for the example! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there
This "play" is for anyone who might need help with this. I was able to have this working after looking at the source code on this repo and it just meets my needs. The code is just for demo, needs cleanup.
https://play.tailwindcss.com/RywGznSO8m
Notes:
The "tabs4tabs" holds on the tab names. There is an extra added hidden tab, so that the last tab is not having a "block" edge.
The "tabs4content" hold the contents for each of the tabs.
When a tab is Active...
Add class > [--tab-bg:hsl(var(--b2))] & tab-active
Remove class > [--tab-border-color:transparent] & hidden
If tab position = 1, then tabs4content.RemoveClass("rounded-tl-box") else tabs4content.AddClass("rounded-tl-box")
For all In-Active Tabs - execute reverse of above.
Beta Was this translation helpful? Give feedback.
All reactions