In the "Component preview" section, each card has an id (e.g. card-code-demo)
for the tab selection to be able to target it.
The target is set in the tab button through the data-target
attribute).
The list of tab buttons has an id tab-list
used to identify the element in JavaScript and implement the tab selection logic.
These ids are combinned with aria-labelledby
to make it clear for screen readers which tab is being selected.
This id is targetted by both CSS and JavaScript to implement the component behaviour.
Collapsible ids (e.g. collapsible-1
)
These ids are targetted by CSS to implement the collapsibles behaviour.
All ids inside this section are targetted by JavaScript to implement the carousel scrolling behaviour.
.code-snippet
: targetted by JavaScript for the code blur overflow logic..toggle.button
,.code-container
,.button-container
: all targetted by JavaScript for the tab selection logic.
.endicator
: targetted by JavaScript for the carousel logic.
Any non-tailwind className is targetted in main.css
for custom styling.