How to use the css button generator
- Set the text, colours and sizes.
- Choose filled or outline and a shadow.
- Copy the CSS and add class="button" to your link or button.
Accessible buttons
The tool shows the contrast between the text and background. Aim for at least 4.5:1 so everyone can read the label. The CSS includes a visible focus outline for keyboard users, which you should keep.
Examples
Contrast 6.3:1
Transparent button that fills on hover