x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<div class="flex items-center justify-center min-h-[400px] p-8"> <div class="max-w-2xl text-center"> <div class="mb-6"> <svg class="w-20 h-20 mx-auto text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/> </svg> </div> <h2 class="text-3xl font-bold text-gray-900 mb-4">Turbo Disabled Mode</h2> <p class="text-lg text-gray-600 mb-6"> This example demonstrates the component with <code class="px-2 py-1 bg-gray-100 rounded text-sm font-mono">turbo: false</code>. Tabs use standard navigation instead of Turbo Frames. </p> <div class="bg-blue-50 border border-blue-200 rounded-lg p-6 mb-8 text-left"> <h3 class="font-semibold text-blue-900 mb-3">Features:</h3> <ul class="space-y-2 text-sm text-blue-800"> <li>✓ Standard page navigation (no Turbo Frame)</li> <li>✓ Active state with <code class="bg-blue-100 px-1 rounded">aria-current="page"</code></li> <li>✓ No <code class="bg-blue-100 px-1 rounded">turbo_frame_id</code> required</li> <li>✓ Persistent navigation across pages</li> </ul> </div> <a href="/products/features" class="inline-flex items-center gap-2 px-6 py-3 bg-indigo-600 text-white font-semibold rounded-lg hover:bg-indigo-700 transition-colors shadow-lg hover:shadow-xl"> <span>View Live Example</span> <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"/> </svg> </a> <p class="text-sm text-gray-500 mt-4"> Click the button to see the component with full page navigation </p> </div></div>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div class="flex items-center justify-center min-h-[400px] p-8"> <div class="max-w-2xl text-center"> <div class="mb-6"> <svg class="w-20 h-20 mx-auto text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/> </svg> </div> <h2 class="text-3xl font-bold text-gray-900 mb-4">Turbo Disabled Mode</h2> <p class="text-lg text-gray-600 mb-6"> This example demonstrates the component with <code class="px-2 py-1 bg-gray-100 rounded text-sm font-mono">turbo: false</code>. Tabs use standard navigation instead of Turbo Frames. </p> <div class="bg-blue-50 border border-blue-200 rounded-lg p-6 mb-8 text-left"> <h3 class="font-semibold text-blue-900 mb-3">Features:</h3> <ul class="space-y-2 text-sm text-blue-800"> <li>✓ Standard page navigation (no Turbo Frame)</li> <li>✓ Active state with <code class="bg-blue-100 px-1 rounded">aria-current="page"</code></li> <li>✓ No <code class="bg-blue-100 px-1 rounded">turbo_frame_id</code> required</li> <li>✓ Persistent navigation across pages</li> </ul> </div> <a href="<%= features_products_path %>" class="inline-flex items-center gap-2 px-6 py-3 bg-indigo-600 text-white font-semibold rounded-lg hover:bg-indigo-700 transition-colors shadow-lg hover:shadow-xl"> <span>View Live Example</span> <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"/> </svg> </a> <p class="text-sm text-gray-500 mt-4"> Click the button to see the component with full page navigation </p> </div></div>No notes provided.
No params configured.
app/assets/stylesheets/components/tabbed_turbo_nav.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@layer components { .elevate-turbo-tabs--scheme--pills { .elevate-turbo-tab--nav-list { @apply inline-flex p-1.5 gap-x-1 bg-secondary-100 rounded-full select-none my-3; } .elevate-turbo-tabs--tab { @apply inline-flex items-center text-sm font-medium rounded-full px-3 py-1 whitespace-nowrap cursor-pointer border border-transparent transition-all duration-300 ease-in-out hover:border-gray-800; &:is([aria-selected="true"], [aria-current="page"]) { @apply bg-white text-primary-700 border border-primary-700 cursor-default; } } .elevate-turbo-tab--frame-container { @apply relative min-h-96; } .elevate-turbo-tab--frame-container--loading { @apply pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-transparent/25 opacity-0 [[busy]~&]:opacity-100 backdrop-blur-sm transition-opacity; } } /* ========= SCHEME BADGE ========= */ .elevate-turbo-tabs--scheme--badge { .elevate-turbo-tab--nav-list { @apply flex gap-x-8 border-b border-primary-200 select-none; } .elevate-turbo-tabs--tab { @apply relative inline-flex items-center gap-x-2 py-3 px-1 text-sm font-normal text-secondary-500 whitespace-nowrap cursor-pointer transition-all duration-200 ease-in-out hover:text-secondary-900; &::after { @apply content-[''] pointer-events-none absolute left-0 right-0 bottom-[-1px] h-0.5 w-full bg-primary-700 scale-x-0 opacity-0 transition-all duration-200 ease-in-out; } &:is([aria-selected="true"], [aria-current="page"]) { @apply text-secondary-700; &::after { @apply scale-x-100 opacity-100; } .elevate-turbo-tabs--tab-badge { @apply bg-primary-100 text-primary-700 border border-primary-200; } } .elevate-turbo-tabs--tab-badge { @apply inline-flex items-center justify-center min-w-[1.75rem] px-2 py-0.5 rounded-md bg-gray-100 font-semibold leading-tight text-secondary-700 transition-all duration-200 ease-in-out; } } .elevate-turbo-tab--frame-container { @apply relative min-h-96; } .elevate-turbo-tab--frame-container--loading { @apply pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-transparent/25 opacity-0 [[busy]~&]:opacity-100 backdrop-blur-sm transition-opacity; } }}