Open any button, copy the HTML into your markup and the CSS into your stylesheet. Every button is a real <button>, so it is focusable, works with the keyboard and submits forms. No JavaScript is involved, even for the click and state animations.
To change the color, set --btn-color on the button or any ancestor. To change the size, set --btn-size: padding, radius, borders and shadows are all in em, so the whole button scales from that one value.
Press and click effects use :active and :focus-visible, so they play for mouse, touch and keyboard. Every snippet ships with a prefers-reduced-motion rule that turns the motion off for people who asked their OS for less of it.
Use a real <button>, then set padding, background, border-radius and a :focus-visible style. Every snippet here is a complete button you can paste as is.
Use transition for state changes such as :hover, :active and :focus-visible, and @keyframes for looping or multi-step motion. Animate transform and opacity so it stays smooth.
Stack a darker edge layer under the face, then move the face down on :active so the button looks like it presses into the page. The 3D Pushable Button above is the complete pattern.
Scale a radial pseudo-element on :active, or play a short keyframe when the button takes focus, from zero to full size while fading it out. The click effect buttons above use this.
Use border-radius: 50% with equal width and height for a round button, a larger --btn-size for a bigger one, and a transparent background with a border for an outline button.