Skip to main content Skills Marketplace Descubra e explore skills de IA criadas pela comunidade.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Copiar promptMostrar detalhes do prompt Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
npx skills add https://github.com/0-CYBERDYNE-SYSTEMS-0/FarmFriend-Terminal-React --skill component-libraryO comando permanece em uma só linha. Role horizontalmente para revisá-lo antes de copiar.
Prefere uma cópia local? Baixe os arquivos disponíveis atualmente no SkillsMP.
Baixar Zip Baixando... Mais deste repositório applescript-automation-mastery Comprehensive AppleScript expertise for enterprise-grade macOS automation including multi-display management, URL scheme handling, deep linking, and complex workflow orchestration
The 'Awwwards Singularity' - Transforms websites into breathtaking digital experiences through cinematic motion, 3D graphics, and avant-garde typography. Eradicates boring, template-based web design.
Guides the agent through a short, repeatable debug loop: capture the failure, isolate the scope, draft a patch plan, and log the decision so the next agent can continue without rereading the entire repo.
Ocupações relacionadas SOC
Baseado na classificação ocupacional SOC
name component_library slug component_library summary Create reusable, accessible UI components with modern design patterns and interactions description Create reusable, accessible UI components with modern design patterns and interactions version 1.0 author FF-Terminal priority medium triggers ["component","button","card","form","modal","navigation","dropdown","accordion","tabs","carousel","slider","component_creation","ui_element_design","interactive_component","create.*component","build.*button","design.*card","make.*form","interactive.*element"] category design dependencies ["frontend_design","responsive_web_design"] config {"supported_components":["buttons","cards","forms","modals","navigation","dropdowns","accordions","tabs","carousels","sliders","tooltips","badges","alerts"],"accessibility_features":["aria_labels","keyboard_navigation","screen_reader_support","focus_management"],"design_systems":["material_design","apple_hig","bootstrap","tailwind","custom_systems"]}
UI Component Library Skill Instructions
You are an expert component designer who creates reusable, accessible, and modern UI components. When this skill is triggered, build complete components with:
Component Design Principles
1. Reusability
Single responsibility: Each component does one thing well
Props-driven: Configure through attributes, not hardcoded values
Stateless where possible: Manage state externally or through callbacks
Theme-aware: Use CSS custom properties for consistent styling
2. Accessibility First
Semantic HTML: Use appropriate elements for each component type
ARIA attributes: Add necessary labels, roles, and states
Keyboard navigation: Ensure all interactions work without mouse
Screen reader support: Test with assistive technologies
Focus management: Proper tab order and focus trapping for modals
3. Progressive Enhancement
Base functionality: Works without JavaScript
Enhanced experience: Add interactions and animations when JS is available
Graceful degradation: Fallback styles for older browsers
Feature detection: Use modern APIs when available
Button Components
1. Base Button
<button class ="btn" type ="button" >
<span class ="btn-text" > Button Text</span >
</button >
<style >
.btn {
display : inline-flex;
align-items : center;
justify-content : center;
border : 1px solid transparent;
border-radius : var (--space-1 );
font-family : inherit;
font-size : (--font-base);
: ;
: none;
: pointer;
: all ease;
: nowrap;
: ;
: (--space- ) (--space- );
: relative;
: hidden;
}
{
: solid (--color-accent);
: ;
}
{
: ;
: not-allowed;
}
{
: ;
: absolute;
: ;
: ;
: ;
: ;
: ;
: ( , , , );
: (- , - );
: width , height ;
}
{
: ;
: ;
}
var
font-weight
500
text-decoration
cursor
transition
0.2s
white-space
min-height
44px
padding
var
2
var
4
position
overflow
.btn
:focus
outline
2px
var
outline-offset
2px
.btn
:disabled
opacity
0.6
cursor
.btn
::after
content
''
position
top
50%
left
50%
width
0
height
0
border-radius
50%
background
rgba
255
255
255
0.5
transform
translate
50%
50%
transition
0.6s
0.6s
.btn
:active
::after
width
300px
height
300px
</style >
2. Icon Button <button class ="btn-icon" type ="button" aria-label ="Close" >
<svg class ="btn-icon-svg" viewBox ="0 0 24 24" fill ="currentColor" >
<path d ="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
</svg >
</button >
<style >
.btn-icon {
display : inline-flex;
align-items : center;
justify-content : center;
width : 44px ;
height : 44px ;
border : 1px solid transparent;
border-radius : var (--space-1 );
background : transparent;
cursor : pointer;
transition : all 0.2s ease;
}
.btn-icon :hover {
background : rgb (var (--color-primary-rgb), 0.1 );
}
.btn-icon :focus {
outline : 2px solid var (--color-accent);
outline-offset : 2px ;
}
.btn-icon-svg {
width : 20px ;
height : 20px ;
color : rgb (var (--color-primary-rgb));
}
</style >
3. Button Group <div class ="btn-group" role ="group" aria-label ="Button group" >
<button class ="btn" type ="button" > Option 1</button >
<button class ="btn" type ="button" > Option 2</button >
<button class ="btn" type ="button" > Option 3</button >
</div >
<style >
.btn-group {
display : inline-flex;
border-radius : var (--space-1 );
overflow : hidden;
}
.btn-group .btn {
border-radius : 0 ;
border-right : none;
}
.btn-group .btn :first-child {
border-top-left-radius : var (--space-1 );
border-bottom-left-radius : var (--space-1 );
}
.btn-group .btn :last-child {
border-top-right-radius : var (--space-1 );
border-bottom-right-radius : var (--space-1 );
border-right : 1px solid rgb (var (--color-primary-rgb), 0.3 );
}
.btn-group .btn :focus {
position : relative;
z-index : 1 ;
}
</style >
Card Components
1. Base Card <article class ="card" >
<header class ="card-header" >
<h3 class ="card-title" > Card Title</h3 >
</header >
<div class ="card-body" >
<p class ="card-content" > Card content goes here...</p >
</div >
<footer class ="card-footer" >
<button class ="btn btn-sm" > Learn More</button >
</footer >
</article >
<style >
.card {
background : white;
border : 1px solid rgb (var (--color-primary-rgb), 0.1 );
border-radius : var (--space-2 );
box-shadow : 0 2px 8px rgba (0 ,0 ,0 ,0.1 );
overflow : hidden;
transition : transform 0.2s ease, box-shadow 0.2s ease;
}
.card :hover {
transform : translateY (-2px );
box-shadow : 0 8px 25px rgba (0 ,0 ,0 ,0.15 );
}
.card-header {
padding : var (--space-4 );
border-bottom : 1px solid rgb (var (--color-primary-rgb), 0.1 );
}
.card-title {
margin : 0 ;
font-size : var (--font-lg);
font-weight : 600 ;
color : rgb (var (--color-primary-rgb));
}
.card-body {
padding : var (--space-4 );
}
.card-content {
margin : 0 ;
line-height : var (--leading-base);
color : var (--color-neutral);
}
.card-footer {
padding : var (--space-3 ) var (--space-4 );
background : rgb (var (--color-primary-rgb), 0.05 );
border-top : 1px solid rgb (var (--color-primary-rgb), 0.1 );
}
</style >
2. Product Card <article class ="product-card" >
<div class ="product-image" >
<img src ="product.jpg" alt ="Product Name" loading ="lazy" >
</div >
<div class ="product-info" >
<h3 class ="product-name" > Product Name</h3 >
<p class ="product-description" > Brief product description...</p >
<div class ="product-price" > $99.99</div >
</div >
<button class ="btn btn-primary product-action" > Add to Cart</button >
</article >
<style >
.product-card {
background : white;
border : 1px solid rgb (var (--color-primary-rgb), 0.1 );
border-radius : var (--space-2 );
box-shadow : 0 2px 8px rgba (0 ,0 ,0 ,0.1 );
overflow : hidden;
transition : transform 0.2s ease;
display : flex;
flex-direction : column;
}
.product-card :hover {
transform : translateY (-4px );
box-shadow : 0 8px 30px rgba (0 ,0 ,0 ,0.15 );
}
.product-image {
height : 200px ;
overflow : hidden;
}
.product-image img {
width : 100% ;
height : 100% ;
object-fit : cover;
transition : transform 0.3s ease;
}
.product-card :hover .product-image img {
transform : scale (1.05 );
}
.product-info {
padding : var (--space-4 );
flex : 1 ;
}
.product-name {
margin : 0 0 var (--space-2 ) 0 ;
font-size : var (--font-lg);
font-weight : 600 ;
color : rgb (var (--color-primary-rgb));
}
.product-description {
margin : 0 0 var (--space-3 ) 0 ;
font-size : var (--font-sm);
color : var (--color-secondary);
line-height : var (--leading-sm);
}
.product-price {
font-size : var (--font-xl);
font-weight : 700 ;
color : rgb (var (--color-accent-rgb));
margin-bottom : var (--space-3 );
}
.product-action {
margin : var (--space-3 );
width : calc (100% - var (--space-6 ));
align-self : center;
}
</style >
Form Components
1. Form Field <div class ="form-group" >
<label for ="email" class ="form-label" > Email Address</label >
<input type ="email" id ="email" class ="form-input" placeholder ="you@example.com" required >
<div class ="form-help" > We'll never share your email.</div >
<div class ="form-error" role ="alert" > </div >
</div >
<style >
.form-group {
margin-bottom : var (--space-4 );
}
.form-label {
display : block;
margin-bottom : var (--space-1 );
font-weight : 500 ;
color : rgb (var (--color-primary-rgb));
font-size : var (--font-sm);
}
.form-input {
width : 100% ;
padding : var (--space-2 ) var (--space-3 );
border : 1px solid rgb (var (--color-primary-rgb), 0.3 );
border-radius : var (--space-1 );
font-size : var (--font-base);
font-family : inherit;
transition : border-color 0.2s ease, box-shadow 0.2s ease;
min-height : 44px ;
}
.form-input :focus {
outline : none;
border-color : rgb (var (--color-primary-rgb));
box-shadow : 0 0 0 3px rgb (var (--color-primary-rgb), 0.1 );
}
.form-input :invalid {
border-color : rgb (var (--color-error-rgb));
}
.form-input :invalid :focus {
border-color : rgb (var (--color-error-rgb));
box-shadow : 0 0 0 3px rgb (var (--color-error-rgb), 0.1 );
}
.form-help {
font-size : var (--font-sm);
color : var (--color-secondary);
margin-top : var (--space-1 );
}
.form-error {
font-size : var (--font-sm);
color : rgb (var (--color-error-rgb));
margin-top : var (--space-1 );
display : none;
}
.form-input :invalid ~ .form-error {
display : block;
}
</style >
2. Checkbox Group <fieldset class ="checkbox-group" >
<legend class ="checkbox-legend" > Select Options</legend >
<label class ="checkbox-item" >
<input type ="checkbox" class ="checkbox-input" name ="options" value ="option1" >
<span class ="checkbox-box" > </span >
<span class ="checkbox-label" > Option 1</span >
</label >
<label class ="checkbox-item" >
<input type ="checkbox" class ="checkbox-input" name ="options" value ="option2" >
<span class ="checkbox-box" > </span >
<span class ="checkbox-label" > Option 2</span >
</label >
</fieldset >
<style >
.checkbox-group {
border : none;
padding : 0 ;
}
.checkbox-legend {
font-weight : 500 ;
margin-bottom : var (--space-2 );
color : rgb (var (--color-primary-rgb));
}
.checkbox-item {
display : flex;
align-items : center;
margin-bottom : var (--space-2 );
cursor : pointer;
}
.checkbox-input {
position : absolute;
opacity : 0 ;
width : 0 ;
height : 0 ;
}
.checkbox-box {
width : 20px ;
height : 20px ;
border : 2px solid rgb (var (--color-primary-rgb), 0.3 );
border-radius : var (--space-1 );
margin-right : var (--space-2 );
display : flex;
align-items : center;
justify-content : center;
transition : all 0.2s ease;
}
.checkbox-input :checked ~ {
: ( (--color-primary-rgb));
: ( (--color-primary-rgb));
}
~ {
: ;
: white;
: bold;
}
~ {
: solid (--color-accent);
: ;
}
{
: (--color-neutral);
}
{
: ( (--color-primary-rgb));
}
</style >
Modal Components
1. Base Modal <div class ="modal-overlay" id ="modal" role ="dialog" aria-labelledby ="modal-title" aria-modal ="true" hidden >
<div class ="modal-container" >
<header class ="modal-header" >
<h2 id ="modal-title" class ="modal-title" > Modal Title</h2 >
<button class ="modal-close" type ="button" aria-label ="Close modal" >
<svg viewBox ="0 0 24 24" fill ="currentColor" >
<path d ="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
</svg >
</button >
</header >
<main class ="modal-body" >
<p > Modal content goes here...</p >
</main >
<footer class ="modal-footer" >
<button class ="btn btn-secondary" type ="button" > Cancel</button >
<button class ="btn btn-primary" type ="button" > Confirm</button >
</footer >
</div >
</div >
<style >
.modal-overlay {
position : fixed;
top : 0 ;
left : 0 ;
right : 0 ;
bottom : 0 ;
background : rgba (0 , 0 , 0 , 0.5 );
display : flex;
align-items : center;
justify-content : center;
z-index : 1000 ;
opacity : 0 ;
visibility : hidden;
transition : opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay :not ([hidden] ) {
opacity : 1 ;
visibility : visible;
}
.modal-container {
background : white;
border-radius : var (--space-3 );
box-shadow : 0 20px 60px rgba (0 ,0 ,0 ,0.3 );
max-width : 90vw ;
max-height : 90vh ;
width : 500px ;
: ( );
: transform ease;
}
( ) {
: ( );
}
{
: flex;
: space-between;
: center;
: (--space- );
: solid ( (--color-primary-rgb), );
}
{
: ;
: (--font-lg);
: ( (--color-primary-rgb));
}
{
: flex;
: center;
: center;
: ;
: ;
: none;
: transparent;
: pointer;
: (--space- );
: background ease;
}
{
: ( (--color-primary-rgb), );
}
{
: solid (--color-accent);
: ;
}
{
: (--space- );
}
{
: flex;
: flex-end;
: (--space- );
: (--space- );
: solid ( (--color-primary-rgb), );
}
</style >
<script >
const modal = document .getElementById ('modal' );
const modalTriggers = document .querySelectorAll ('[data-target="modal"]' );
const modalClose = document .querySelector ('.modal-close' );
function openModal ( ) {
modal.hidden = false ;
document .body .style .overflow = 'hidden' ;
modalClose.focus ();
}
function closeModal ( ) {
modal.hidden = true ;
document .body .style .overflow = '' ;
}
modalTriggers.forEach (trigger => {
trigger.addEventListener ('click' , openModal);
});
modalClose.addEventListener ('click' , closeModal);
modal.addEventListener ('click' , (e ) => {
if (e.target === modal) {
closeModal ();
}
});
modal. ( , {
(e. === ) {
();
}
(e. === ) {
focusableElements = modal. ( );
firstElement = focusableElements[ ];
lastElement = focusableElements[focusableElements. - ];
(e. && . === firstElement) {
e. ();
lastElement. ();
} (!e. && . === lastElement) {
e. ();
firstElement. ();
}
}
});
</script >
Navigation Components
1. Dropdown Menu <nav class ="dropdown-nav" >
<button class ="dropdown-toggle" type ="button" aria-expanded ="false" aria-haspopup ="true" >
Menu
<svg class ="dropdown-arrow" viewBox ="0 0 24 24" fill ="currentColor" >
<path d ="M7 10l5 5 5-5z" />
</svg >
</button >
<ul class ="dropdown-menu" role ="menu" hidden >
<li > <a href ="#" role ="menuitem" > Home</a > </li >
<li > <a href ="#" role ="menuitem" > About</a > </li >
<li > <a href ="#" role ="menuitem" > Services</a > </li >
<li > <a href ="#" role ="menuitem" > Contact</a > </li >
</ul >
</nav >
<style >
.dropdown-nav {
position : relative;
}
.dropdown-toggle {
display : flex;
align-items : center;
gap : var (--space-1 );
padding : var (--space-2 ) var (--space-3 );
border : 1px solid rgb (var (--color-primary-rgb), 0.3 );
border-radius : var (--space-1 );
background : white;
cursor : pointer;
font-size : var (--font-base);
font-weight : 500 ;
transition : all 0.2s ease;
}
.dropdown-toggle :hover {
border-color : rgb (var (--color-primary-rgb));
}
.dropdown-toggle :focus {
outline : 2px solid var (--color-accent);
outline-offset : 2px ;
}
.dropdown-toggle [aria-expanded="true" ] .dropdown-arrow {
transform : rotate (180deg );
}
.dropdown-arrow {
width : ;
: ;
: transform ease;
}
{
: absolute;
: ;
: ;
: ;
: white;
: solid ( (--color-primary-rgb), );
: (--space- );
: ( , , , );
: none;
: ;
: (--space- );
: ;
: hidden;
: (- );
: all ease;
: ;
}
( ) {
: ;
: visible;
: ( );
}
{
: ;
}
{
: block;
: (--space- ) (--space- );
: (--color-neutral);
: none;
: (--space- );
: background ease;
}
{
: ( (--color-primary-rgb), );
: ( (--color-primary-rgb));
}
{
: solid (--color-accent);
: ;
}
</style >
<script >
const dropdownToggle = document .querySelector ('.dropdown-toggle' );
const dropdownMenu = document .querySelector ('.dropdown-menu' );
function toggleDropdown ( ) {
const isOpen = dropdownToggle.getAttribute ('aria-expanded' ) === 'true' ;
dropdownToggle.setAttribute ('aria-expanded' , !isOpen);
dropdownMenu.hidden = isOpen;
}
function closeDropdown (e ) {
if (!e.target .closest ('.dropdown-nav' )) {
dropdownToggle.setAttribute ('aria-expanded' , 'false' );
dropdownMenu.hidden = true ;
}
}
dropdownToggle.addEventListener ('click' , toggleDropdown);
document .addEventListener ('click' , closeDropdown);
dropdownToggle.addEventListener ('keydown' , (e ) => {
if (e.key === 'Enter' || e.key === ' ' ) {
e.preventDefault ();
();
}
});
(dropdownMenu. === ) {
dropdownMenu. ( ). ();
}
</script >
Tab Components
1. Tab System <div class ="tab-container" >
<div class ="tab-list" role ="tablist" >
<button class ="tab-btn active" role ="tab" aria-selected ="true" aria-controls ="panel1" id ="tab1" > Tab 1</button >
<button class ="tab-btn" role ="tab" aria-selected ="false" aria-controls ="panel2" id ="tab2" > Tab 2</button >
<button class ="tab-btn" role ="tab" aria-selected ="false" aria-controls ="panel3" id ="tab3" > Tab 3</button >
</div >
<div class ="tab-panels" >
<section class ="tab-panel active" id ="panel1" role ="tabpanel" aria-labelledby ="tab1" >
<h3 > Panel 1 Content</h3 >
<p > Content for the first tab panel...</p >
</section >
<section class ="tab-panel" id ="panel2" role ="tabpanel" aria-labelledby ="tab2" hidden >
<h3 > Panel 2 Content</h3 >
<p > Content for the second tab panel...</p >
</section >
<section class ="tab-panel" id ="panel3" role ="tabpanel" aria-labelledby ="tab3" hidden >
<h3 > Panel 3 Content</h3 >
<p > Content for the third tab panel...</p >
</section >
</div >
</div >
<style >
.tab-container {
border : 1px solid rgb (var (--color-primary-rgb), 0.1 );
border-radius : var (--space-2 );
overflow : hidden;
}
.tab-list {
display : flex;
border-bottom : 1px solid rgb (var (--color-primary-rgb), 0.1 );
background : rgb (var (--color-primary-rgb), 0.05 );
}
.tab-btn {
flex : 1 ;
padding : var (--space-3 );
border : none;
background : transparent;
cursor : pointer;
font-size : var (--font-base);
font-weight : 500 ;
color : var (--color-secondary);
transition : all 0.2s ease;
position : relative;
}
.tab-btn :hover {
color : rgb (var (--color-primary-rgb));
background : rgb (var (--color-primary-rgb), 0.05 );
}
.tab-btn .active ,
.tab-btn {
: ( (--color-primary-rgb));
: solid ( (--color-primary-rgb));
: white;
}
{
: solid (--color-accent);
: - ;
}
{
: white;
}
{
: (--space- );
: ;
: ( );
: all ease;
}
,
( ) {
: ;
: ( );
}
{
: none;
}
</style >
<script >
const tabButtons = document .querySelectorAll ('.tab-btn' );
const tabPanels = document .querySelectorAll ('.tab-panel' );
function activateTab (tabButton ) {
tabButtons.forEach (btn => {
btn.setAttribute ('aria-selected' , 'false' );
btn.classList .remove ('active' );
});
tabPanels.forEach (panel => {
panel.setAttribute ('hidden' , 'true' );
panel.classList .remove ('active' );
});
const targetPanelId = tabButton.getAttribute ('aria-controls' );
const targetPanel = document .getElementById (targetPanelId);
tabButton.setAttribute ('aria-selected' , 'true' );
tabButton.classList .add ('active' );
targetPanel.removeAttribute ('hidden' );
targetPanel.classList . ( );
}
tabButtons. ( {
button. ( , (button));
button. ( , {
(e. === || e. === ) {
e. ();
(button);
}
});
});
tabButtons. ( {
button. ( , {
targetIndex;
(e. === || e. === ) {
e. ();
targetIndex = index > ? index - : tabButtons. - ;
} (e. === || e. === ) {
e. ();
targetIndex = index < tabButtons. - ? index + : ;
}
(targetIndex !== ) {
tabButtons[targetIndex]. ();
}
});
});
</script >
Implementation Guidelines When creating components:
Accessibility First : Include ARIA labels, roles, and keyboard navigation from the start
Semantic HTML : Use appropriate HTML elements for each component type
CSS Custom Properties : Use variables for theming and consistency
Progressive Enhancement : Ensure base functionality without JavaScript
Touch-Friendly : Minimum 44px touch targets for mobile
Focus Management : Proper focus order and visual focus indicators
Screen Reader Support : Test with assistive technologies
Cross-Browser Compatibility : Test on modern browsers
Performance : Optimize animations and interactions
Documentation : Include clear usage examples and API reference
Create reusable, accessible, and modern UI components that enhance user experience across all devices and abilities.
.checkbox-box
background
rgb
var
border-color
rgb
var
.checkbox-input
:checked
.checkbox-box
::after
content
'✓'
color
font-weight
.checkbox-input
:focus
.checkbox-box
outline
2px
var
outline-offset
2px
.checkbox-label
color
var
.checkbox-item
:hover
.checkbox-box
border-color
rgb
var
transform
scale
0.9
transition
0.3s
.modal-overlay
:not
[hidden]
.modal-container
transform
scale
1
.modal-header
display
justify-content
align-items
padding
var
4
border-bottom
1px
rgb
var
0.1
.modal-title
margin
0
font-size
var
color
rgb
var
.modal-close
display
align-items
justify-content
width
32px
height
32px
border
background
cursor
border-radius
var
1
transition
0.2s
.modal-close
:hover
background
rgb
var
0.1
.modal-close
:focus
outline
2px
var
outline-offset
2px
.modal-body
padding
var
4
.modal-footer
display
justify-content
gap
var
2
padding
var
4
border-top
1px
rgb
var
0.1
addEventListener
'keydown'
(e ) =>
if
key
'Escape'
closeModal
if
key
'Tab'
const
querySelectorAll
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
const
0
const
length
1
if
shiftKey
document
activeElement
preventDefault
focus
else
if
shiftKey
document
activeElement
preventDefault
focus
16px
height
16px
transition
0.2s
.dropdown-menu
position
top
100%
left
0
min-width
200px
background
border
1px
rgb
var
0.1
border-radius
var
1
box-shadow
0
4px
12px
rgba
0
0
0
0.15
list-style
margin
0
padding
var
1
opacity
0
visibility
transform
translateY
10px
transition
0.2s
z-index
100
.dropdown-menu
:not
[hidden]
opacity
1
visibility
transform
translateY
0
.dropdown-menu
li
margin
0
.dropdown-menu
a
display
padding
var
2
var
3
color
var
text-decoration
border-radius
var
1
transition
0.2s
.dropdown-menu
a
:hover
background
rgb
var
0.1
color
rgb
var
.dropdown-menu
a
:focus
outline
2px
var
outline-offset
1px
toggleDropdown
if
hidden
false
querySelector
'a'
focus
[aria-selected="true" ]
color
rgb
var
border-bottom
2px
rgb
var
background
.tab-btn
:focus
outline
2px
var
outline-offset
2px
.tab-panels
background
.tab-panel
padding
var
4
opacity
0
transform
translateY
10px
transition
0.3s
.tab-panel
.active
.tab-panel
:not
[hidden]
opacity
1
transform
translateY
0
.tab-panel
[hidden]
display
add
'active'
forEach
button =>
addEventListener
'click'
() =>
activateTab
addEventListener
'keydown'
(e ) =>
if
key
'Enter'
key
' '
preventDefault
activateTab
forEach
(button, index ) =>
addEventListener
'keydown'
(e ) =>
let
if
key
'ArrowLeft'
key
'ArrowUp'
preventDefault
0
1
length
1
else
if
key
'ArrowRight'
key
'ArrowDown'
preventDefault
length
1
1
0
if
undefined
focus