Skip to content
tablericons
Category
weather
Styles
Outline
Component
IconSunMoon

weather

Sun Moon icon

Download the Sun Moon icon as free SVG or PNG. Customize its outline stroke. Copy React, Vue or Svelte code.

  • theme
  • dark-mode
  • light-mode
  • toggle
  • day
  • night
  • appearance
  • weather
  • sun
  • moon
Size
Stroke
Color
Download SVG

Press C to copy SVG, J for JSX, D to download.

Code

Copy it the way you use it

sun-moon.svg
<svg
  xmlns="http://www.w3.org/2000/svg"
  width="24"
  height="24"
  viewBox="0 0 24 24"
  fill="none"
  stroke="currentColor"
  stroke-width="2"
  stroke-linecap="round"
  stroke-linejoin="round"
 
>
  <path d="M9.173 14.83a4 4 0 1 1 5.657 -5.657" />
  <path d="M11.294 12.707l.174 .247a7.5 7.5 0 0 0 8.845 2.492a9 9 0 0 1 -14.671 2.914" />
  <path d="M3 12h1" />
  <path d="M12 3v1" />
  <path d="M5.6 5.6l.7 .7" />
  <path d="M3 21l18 -18" />
</svg>

Use the Sun Moon icon

For a decorative icon beside text, add aria-hidden="true" to the SVG. For an icon-only control, put its accessible name on the button or link.

React example
import { IconSunMoon } from '@tabler/icons-react';

<IconSunMoon size={24} stroke={2} />
Read the React guide
Vue example
import { IconSunMoon } from '@tabler/icons-vue';

<IconSunMoon :size="24" :stroke="2" />
Read the Vue guide
Svelte 5 example
import { IconSunMoon } from '@tabler/icons-svelte-runes';

<IconSunMoon size={24} stroke={2} />
Read the Svelte guide

Related

Related icons

See all 79 weather icons