New in February 2026 — See what's new
DazlDocs
Building with DazlDesign and Refine

Styling Element States

Buttons, links, and interactive elements often look different when hovered, focused, or clicked. Dazl lets you lock an element into a specific state and style it directly — a capability that static design tools can't offer.

Buttons, links, and interactive elements often look different when hovered, focused, or clicked. Dazl lets you lock an element into a specific state and style it directly — a capability that static design tools can't offer.

Selecting a State

  1. In Edit mode, select an element
  2. In the Editing Toolbar, find the Element states control
  3. Check the state you want to style: Hover, Active, Focus, Focus visible, or Focus within. You can enable multiple states at once to preview combined interactions.

The Editing Toolbar showing the Element states control with Hover selected

The preview locks the element into that state, so you can see and edit how it looks. For example, checking Hover on a button shows it as if your cursor were over it.

Editing a State

Once you've selected a state, use any of the toolbar controls to make changes:

  • Change the text color or background color on hover
  • Adjust borders or shadows for the focus state
  • Modify typography for the active state

These changes are written as CSS pseudo-class rules (:hover, :focus, :active) in the source code, targeting that specific state.

Previewing States

After making your changes, uncheck all states in the state selector and then switch to Preview mode to interact with the element normally. Hover over the element to see your hover styles in action.

Designing interactive states is one of the areas where Dazl's web-native approach matters most. Static design tools let you mock up a hover state, but you can't actually hover to see how it feels. In Dazl, you're designing the real interaction.

Common State Styling Patterns

  • Buttons — darken the background on hover, add a subtle shadow on focus
  • Links — change color or add an underline on hover
  • Cards — lift with a shadow on hover to suggest clickability
  • Input fields — highlight the border on focus to show which field is active

On this page