CSS Artart-componentsimplemented2 demos

ArtSun

ArtSun renders the ArtSun CSS-art scene as a reusable React component.

Import@duskmoon-dev/art-components
1API sections
3documented props
1behavior scenarios
Key API
rayssunsetpulse

Usage

When to use

  • Use it when a page needs a reusable DuskMoon visual asset rendered from CSS rather than an image.
  • Keep it decorative unless the illustration carries information that must be announced.

Implementation notes

StylesheetImport @duskmoon-dev/art-components/styles.css once before rendering art components.
StateStart with default props for static examples, then switch to controlled props when state must be shared.
SizingUse the size prop and CSS custom properties to adapt the scene without replacing markup.

Features

CSS-art wrapper

Renders the matching @duskmoon-dev/css-art scene through a typed React component.

Accessible decoration

Defaults to decorative output while allowing aria labels and roles when the scene carries meaning.

Primary API surface

ArtSun is most often configured through `rays`, `sunset`, `pulse`.

Covered behavior

Renders rays, sunset, and pulse variants

Feature Demos

Feature demos are authored for the component page, then supplemented with behavior scenarios from the component test coverage.

Preview

Basic usage

authored

Import ArtSun and the art component stylesheet before rendering the CSS art scene.

Source
import "@duskmoon-dev/art-components/styles.css";
import { ArtSun } from "@duskmoon-dev/art-components";

export function Example() {
  return (<ArtSun size="lg" rays pulse />);
}
Preview

Accessible art

authored

Use ArtSun as decorative output by default, or pass accessible labeling when the scene is meaningful.

Source
import "@duskmoon-dev/art-components/styles.css";
import { ArtSun } from "@duskmoon-dev/art-components";

export function AccessibleArt() {
  return (<ArtSun size="lg" rays pulse
  decorative={false}
  aria-label="Art Sun illustration" />);
}

API

The API reference below lists every parsed exported type or interface for ArtSun. Start with `rays`, `sunset`, `pulse` for common usage.

Types: packages/art-components/src/index.tsxScenarios: packages/art-components/tests/art-components.test.tsx
ArtSunPropsinterface extends ExtendedSizedArtProps
PropTypeRequiredDescription
raysbooleanNorays configures ArtSun.
sunsetbooleanNosunset configures ArtSun.
pulsebooleanNopulse configures ArtSun.