ArtSnowflake
ArtSnowflake renders the ArtSnowflake CSS-art scene as a reusable React component.
@duskmoon-dev/art-components 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
Features
Renders the matching @duskmoon-dev/css-art scene through a typed React component.
Defaults to decorative output while allowing aria labels and roles when the scene carries meaning.
ArtSnowflake is most often configured through `unicode`, `fall`.
Supports unicode and falling snowflake variants
Feature Demos
Feature demos are authored for the component page, then supplemented with behavior scenarios from the component test coverage.
Basic usage
Import ArtSnowflake and the art component stylesheet before rendering the CSS art scene.
import "@duskmoon-dev/art-components/styles.css";
import { ArtSnowflake } from "@duskmoon-dev/art-components";
export function Example() {
return (<ArtSnowflake
unicode
fall
style={{
"--art-snowflake-size": "32px",
"--art-snowflake-color": "#76d7ff"
}}
/>);
} Accessible art
Use ArtSnowflake as decorative output by default, or pass accessible labeling when the scene is meaningful.
import "@duskmoon-dev/art-components/styles.css";
import { ArtSnowflake } from "@duskmoon-dev/art-components";
export function AccessibleArt() {
return (<ArtSnowflake
unicode
fall
style={{
"--art-snowflake-size": "32px",
"--art-snowflake-color": "#76d7ff"
}}
decorative={false}
aria-label="Art Snowflake illustration"
/>);
} API
The API reference below lists every parsed exported type or interface for ArtSnowflake. Start with `unicode`, `fall` for common usage.
packages/art-components/src/index.tsx
Scenarios: packages/art-components/tests/art-components.test.tsx | Prop | Type | Required | Description |
|---|---|---|---|
unicode | boolean | No | unicode configures ArtSnowflake. |
fall | boolean | No | fall configures ArtSnowflake. |