UNPKG

retro-react

Version:

A React component library for building retro-style websites

48 lines (47 loc) 1.22 kB
/** @jsxImportSource theme-ui */ import React, { CSSProperties } from 'react'; interface StarFieldProps { /** * The number of stars to render. * * @default 100 */ numStars?: number; /** * The speed of the stars. * * @default 1 */ speed?: number; /** * The size of the stars. * * @default 2 */ size?: number; /** * The color of the stars. * * @default 'white' */ starColor?: CSSProperties['color']; /** * The style of the image. Used instead of the `sx` prop. * * @default undefined */ style?: CSSProperties; } /** * A starfield component used similarly to the `<Background />` component. It renders a `canvas` element that animates a starfield. It is recommended to wrap this component in a `<Container />` component. * Since this component uses a canvas element, it is recommended to use this component sparingly. * * @example * ```tsx * <Container sx={{ width: '100%', height: '500px', position: 'relative' }}> * <StarField /> * </Container> * ``` */ export declare const StarField: React.FC<StarFieldProps>; export {};