- Interaction
- Click replay
- Category
- Text editing
- Duration
- 1.33 s
- Frame rate
- 30 fps
- Artboard
- 32 × 32 px
- Lottie size
- 4.3 kB
Align Right
Animated align right icon
Align Right is a 1.33 s micro animation that replays on every click; use it for text alignment controls in design tools. Click icons typically confirm send, save, refresh, download, add-to-cart and formatting buttons.
Free under the MIT license · Markdown version · About the files
Use it
npm install react-useanimationsimport UseAnimations from 'react-useanimations';
import alignRight from 'react-useanimations/lib/alignRight';
<UseAnimations animation={alignRight} size={32} />npx shadcn@latest add https://useanimations.com/r/align-right.jsonimport { AnimatedAlignRight } from '@/components/animations/align-right';
<AnimatedAlignRight size={24} /><div id="align-right-icon" style="width: 48px; height: 48px"></div>
<script src="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js"></script>
<script>
const el = document.getElementById('align-right-icon');
const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/align-right.json' });
const motion = matchMedia('(prefers-reduced-motion: reduce)');
el.addEventListener('click', () => { if (!motion.matches) a.playSegments([0, a.totalFrames], true); });
</script>Align Right runs on the light build, lottie_light.min.js.
import LottieView from 'lottie-react-native';
<LottieView source={{ uri: 'https://useanimations.com/icons/align-right.json' }} autoPlay loop={false} style={{ width: 48, height: 48 }} />import Lottie
LottieView {
await LottieAnimation.loadedFrom(url: URL(string: "https://useanimations.com/icons/align-right.json")!)
}
.playing(loopMode: .playOnce)
.frame(width: 48, height: 48)val composition by rememberLottieComposition(LottieCompositionSpec.Url("https://useanimations.com/icons/align-right.json"))
LottieAnimation(composition, iterations = 1, modifier = Modifier.size(48.dp))import 'package:lottie/lottie.dart';
Lottie.network('https://useanimations.com/icons/align-right.json', width: 48, height: 48, repeat: false)Bundle align-right.json with the app to use it offline.
<img src="https://useanimations.com/icons/align-right/align-right.svg" alt="Align Right" width="24" height="24" />Inside <img> the SVG draws black; inline it to follow the text color.
Static SVG
Questions about the Align Right icon
›Do fast clicks on Align Right queue up?
No queue: every click restarts the 1.33 s run from the first frame. With reduced motion preferred, clicks still reach your onClick but the icon stays still.
›Should the Align Right icon be a <button>?
Put its events on a real button with the render prop: render={(events, icon) => <button aria-label="Align Right" {...events}><span {...icon} /></button>}. The animation itself stays aria-hidden.
›Can Align Right play on hover instead?
Yes: pass interaction="hover-replay". It then plays once on mouseenter unless reduced motion is preferred. Leaving does not stop it; entering during playback does not restart it.