development-plugin-for-avalonia

Motion, Focus, Accessibility, and Design Review in Avalonia

Scope and Primary APIs

Use this reference to finish interaction polish without harming usability.

Primary APIs:

High-value state helpers:

Motion Pattern

<Border xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Classes="interactive-card"
        RenderTransform="translateY(0px)">
  <Border.Transitions>
    <Transitions>
      <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.16" />
      <BoxShadowsTransition Property="BoxShadow" Duration="0:0:0.16" />
    </Transitions>
  </Border.Transitions>
</Border>
<Style Selector="Border.interactive-card:pointerover">
  <Setter Property="RenderTransform" Value="translateY(-2px)" />
</Style>
<Style Selector="Border.interactive-card:focus-visible">
  <Setter Property="BorderBrush" Value="{DynamicResource Brush.Focus}" />
  <Setter Property="BorderThickness" Value="2" />
</Style>

Accessibility Rules

Design Review Checklist

AOT and Performance Notes

Do and Don’t Guidance

Do:

Do not:

Troubleshooting

  1. Motion feels distracting.
    • Reduce distance, duration, and the number of moving properties.
  2. Focus is hard to see.
    • Increase border or outline contrast and ensure :focus-visible wins precedence.
  3. Screen-reader behavior is unclear on compact UIs.
    • Audit labels, names, and action text rather than relying on iconography alone.

Official Resources