CSS Art art-components implemented 2 demos

ArtMoon

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

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

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

Stylesheet Import @duskmoon-dev/art-components/styles.css once before rendering art components.
State Start with default props for static examples, then switch to controlled props when state must be shared.
Sizing Use 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

ArtMoon is most often configured through `crescent`, `glow`.

Covered behavior

Renders crescent and glow 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 ArtMoon and the art component stylesheet before rendering the CSS art scene.

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

export function Example() {
  return (<ArtMoon size="lg" crescent glow />);
}
Preview

Accessible art

authored

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

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

export function AccessibleArt() {
  return (<ArtMoon size="lg" crescent glow
  decorative={false}
  aria-label="Art Moon illustration" />);
}

API

The API reference below lists every parsed exported type or interface for ArtMoon. Start with `crescent`, `glow` for common usage.

Types: packages/art-components/src/index.tsx Scenarios: packages/art-components/tests/art-components.test.tsx
ArtMoonProps interface extends ExtendedSizedArtProps
Prop Type Required Description
crescent boolean No crescent configures ArtMoon.
glow boolean No glow configures ArtMoon.