JSFiddle - React, Tailwind, and code Playground
by Simon060694
HTML
<div class="links">
<ul class="links__list" style="--item-total:5">
<li class="links__item" style="--item-count:1">
<a class="links__link" href="#">
<svg class="links__icon" viewBox="0 0 32 32">
<path d="M0 31.479c0 0.276 0.224 0.5 0.5 0.5h31.111c0.067 0 0.132-0.013 0.193-0.039s0.116-0.063 0.162-0.109c0.001-0.001 0.002-0.001 0.003-0.002 0.003-0.003 0.003-0.009 0.007-0.012 0.051-0.055 0.084-0.122 0.107-0.195 0.007-0.023 0.010-0.045 0.014-0.069 0.004-0.025 0.015-0.047 0.015-0.073 0-0.040-0.014-0.075-0.023-0.112-0.003-0.014 0.003-0.028-0.002-0.042l-3.16-9.715c-0.024-0.075-0.066-0.144-0.122-0.199l-17.117-17.118c-0.018-0.028-0.031-0.058-0.055-0.083l-3.739-3.739c-0.607-0.607-1.595-0.607-2.203 0l-5.235 5.235c-0.294 0.294-0.456 0.685-0.456 1.101s0.162 0.808 0.456 1.102l3.656 3.656c0.018 0.027 0.030 0.058 0.054 0.082l17.090 17.205c0.059 0.060 0.131 0.103 0.212 0.127l6.713 2h-27.681c-0.276-0.001-0.5 0.223-0.5 0.499zM6.362 10.161l15.687 15.486-0.577 2.002-16.245-16.353 1.135-1.135zM22.816 25l-15.748-15.545 2.437-2.437 15.607 15.648v2.334h-2.296zM25.735 21.875l-15.523-15.564 1.039-1.039 16.211 16.211-1.727 0.392zM22.988 26h2.624c0.276 0 0.5-0.224 0.5-0.5v-2.685l2.007-0.456 2.723 8.37-8.488-2.529 0.634-2.2zM1 6.808c0-0.149 0.058-0.288 0.163-0.394l5.235-5.235c0.217-0.217 0.57-0.218 0.789 0l3.372 3.372-6.023 6.023-3.372-3.372c-0.106-0.105-0.164-0.245-0.164-0.394z"></path>
</svg>
<span class="links__text">Pencil</span>
</a>
</li>
<li class="links__item" style="--item-count:2">
<a class="links__link" href="#">
<svg class="links__icon" viewBox="0 0 31 32">
<path d="M0.211 5.646c-0.847 0.848-0.666 2.042 0.008 2.715 0.027 0.026 2.734 2.612 6.541 6.419 0.098 0.098 0.226 0.146 0.354 0.146s0.256-0.049 0.354-0.146c0.195-0.195 0.195-0.512 0-0.707-0.574-0.574-1.12-1.117-1.638-1.631l1.589-1.589c0.195-0.195 0.195-0.512 0-0.707s-0.512-0.195-0.707 0l-1.593...
CSS
:root {
--base-grid: 8px;
--colour-white: #fff;
--colour-black: #1a1a1a;
}
*, :after, :before {
box-sizing: border-box;
}
html {
margin: 0;
padding: 0;
}
body {
background-size: 112px 112px,112px 112px,56px 56px,56px 56px,28px 28px,28px 28px;
font-family: Josefin Sans, sans-serif;
margin: 0;
padding: 0;
}
.links {
--link-size: calc(var(--base-grid)*20);
color: var(--colour-black);
display: flex;
justify-content: center;
align-items: center;
width: 100%;
min-height: 100vh;
}
.links__list {
position: relative;
list-style: none;
transform:scale(0.1);
transform-origin:center;
}
.links__list svg{
display:none;
}
.links__item {
width: var(--link-size);
height: var(--link-size);
position: absolute;
top: 0;
left: 0;
margin-top: calc(var(--link-size)/-2);
margin-left: calc(var(--link-size)/-2);
--angle: calc(360deg/var(--item-total));
--rotation: calc(140deg + var(--angle)*var(--item-count));
transform: rotate(var(--rotation)) translate(calc(var(--link-size) + var(--base-grid)*2)) rotate(calc(var(--rotation)*-1));
}
.links__link {
opacity: 0;
animation: on-load .3s ease-in-out forwards;
animation-delay: calc(var(--item-count)*150ms);
width: 100%;
height: 100%;
border-radius: 50%;
position: relative;
background-color: var(--colour-white);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-decoration: none;
color: inherit;
}
.links__icon {
width: calc(var(--base-grid)*8);
height: calc(var(--base-grid)*8);
transition: all .3s ease-in-out;
fill: var(--colour-black);
}
.links__text {
position: absolute;
width: 100%;
left: 0;
text-align: center;
height: calc(var(--base-grid)*2);
font-size: calc(var(--base-grid)*2);
display: none;
bottom: calc(var(--base-grid)*8.5);
animation: text .3s ease-in-out forwards;
}
.links__link:after {
content: "";
background-color: transparent;
width:...