OPEN-UI

Star Background

Canvas 2D starfield background. Configurable star count, twinkle speed, and color. Suited for hero sections or page backgrounds with optional overlay content.

Stars

Install

Use Open-UI CLI or Shadcn CLI to install the component.

Open-UI CLI

Shadcn CLI

Usage

PropDefaultDescriptionType
starCount200Number of stars to render in the canvas.number
twinkleSpeed0.002Speed of the twinkle animation (0 to disable).number
starColor"255, 255, 255"Star color as RGB comma-separated string (e.g. "255, 255, 255").string
backgroundColor"transparent"Background color of the canvas (CSS color).string
classNameAdditional CSS class for the canvas element.string
containerClassNameAdditional CSS class for the outer container.string
childrenOptional overlay content rendered above the starfield.ReactNode
styleInline CSS styles for the root container.CSSProperties

Related Components