---
title: "Sun animated icon"
description: "Sun animated icon (Interface). The sun comes out. Light: a wave of light runs clockwise from the top ray: each ray pulls back into the disc and shines out again in turn, and the disc swells once as the light goes out. Strong: the rays shine out past their length and spring back in turn while the ring of rays turns a little with the light and springs back, and the disc swells harder."
canonical: https://generativeicons.com/icons/sun/
---

# Sun animated icon

The sun comes out. Light: a wave of light runs clockwise from the top ray: each ray pulls back into the disc and shines out again in turn, and the disc swells once as the light goes out. Strong: the rays shine out past their length and spring back in turn while the ring of rays turns a little with the light and springs back, and the disc swells harder.

- Id: `sun`
- Category: Interface
- Search terms: sunny, sunshine, light mode, day mode, light theme, daytime, day, summer, clear sky, hot, weather
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/sun.lottie (dotLottie, 5413 bytes, sha256 01afddc5b221251620d0a2e323ae9987a43922628587c8a652585ae5c2643ecd)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add sun
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/sun.mjs';

export function SunIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/sun.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/sun/ · https://generativeicons.com/api/icons/sun
