A good button tells the visitor it heard them. It lifts a little when the mouse comes near, dips when it is pressed, and shows a clear ring when someone reaches it with the Tab key. In Cairnstone you set all three in the Styles tab, with no code.
One button, four looks
At the top of the Styles tab in Cairnstone → Blocks sit five state buttons: Default, Hover, Focus, Active and Disabled. Default is the look at rest. Every other state starts from Default, so you only change what should be different.
Build it
Make a button that answers back
In Cairnstone → Blocks, add a Button and select it.
Open the Styles tab. With Default picked, set the button’s background colour, text colour and corners.
Pick Hover. Under Color, choose a darker shade for the background. Under Advanced, set Move up / down to -1. Under Shadow, set Elevation to Medium.
Pick Active. Under Advanced, set Move up / down to 1, and under Shadow, set Elevation to None, so the shadow goes away while the button is pressed. Not set would keep the Hover shadow.
Pick Focus. Under Border, set Outline width to 2, Outline style to Solid, Outline color to your accent and Outline offset to 2.
Under Advanced, set Transition to 200. It is one value for the whole button. Save the block.
See it before you publish
You do not need to publish to check it. Pick a state button, and the canvas draws the button in that look. Point at the button on the canvas, and it lifts as it will on the page.
Why the ring matters
Many people move through a page with the keyboard. The ring shows them where they are. An outline is drawn just outside the block and takes up no space, so turning it on never moves anything around it.
Calm for those who need it
Some visitors ask their device for less motion. For them, the lift and the dip snap into place, while the colour and the shadow still fade gently. You do not have to set anything for this.
Use it on every page
Place the button in any post or page. It brings its look with it, every state included, and you change the words and the link right there.
Every control in the Styles tab is in Learn every setting in Cairnstone’s block sidebar.




Leave a Reply