Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Shows a simple slideshow using Tachyons classes and JS.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tachyons/4.12.0/tachyons.min.css">
<title>Tachyons Slideshow</title>
<style>.slide{display:none;}.slide.active{display:block;}</style>
</head>
<body class="pa4 tc">
<div id="slides">
<img src="https://via.placeholder.com/600x300" class="slide active" alt="">
<img src="https://via.placeholder.com/600x300" class="slide" alt="">
<img src="https://via.placeholder.com/600x300" class="slide" alt="">
</div>
<button class="f6 link dim br2 ph3 pv2 dib bg-blue white mt3" onclick="nextSlide()">Next</button>
<script>
let current=0;
function nextSlide(){ const slides=document.querySelectorAll('.slide'); slides[current].classList.remove('active'); current=(current+1)%slides.length; slides[current].classList.add('active'); }
</script>
</body>
</html>Tachyons is a functional CSS framework that emphasizes small, reusable utility classes to build fast, responsive, and highly maintainable user interfaces.
Origin & Creator
Created by Adam Morse in 2013 as a minimalist and performance-focused CSS framework.
Industrial Note
Tachyons is popular in projects prioritizing speed, maintainability, and functional CSS over component-heavy frameworks.