image-usage

Render framework-agnostic Image components with adapters like NextImage.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill image-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/image-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill image-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use after component-usage-ux when an app needs @techsio/ui-kit Image or a framework image adapter such as NextImage through the Image atom's as prop.

Core Features & Use Cases

  • Framework-agnostic image slot that can be adapted to NextImage or other adapters via the as prop.
  • Adapter-first usage supporting Next.js and React apps with a clean separation between UI-kit and framework behavior.
  • Accessible and scalable image rendering through alt text and size props.

Quick Start

Place the Image component with an adapter like NextImage and provide src and alt to render a framework-agnostic image.

Frequently Asked Questions about image-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use a framework-agnostic Image component in a React UI kit?

A framework-agnostic Image component accepts src and alt while exposing an as prop adapter, letting your React UI kit render images through adapters like NextImage without coupling to a specific framework.

Can I adapt a UI kit Image component to use NextImage in Next.js?

Yes, you can adapt a UI kit Image component to use NextImage in Next.js by passing the adapter through the as prop, maintaining a clean separation between UI-kit styling and framework-specific behavior.

What's the best way to handle image accessibility and size variations across multiple React apps?

Handling image accessibility and size variations across React apps is best done via a framework-agnostic component that enforces alt text and size props while delegating rendering to framework adapters.

Does the framework-agnostic Image component support product galleries, avatars, and hero images?

Yes, the framework-agnostic Image component supports common usage scenarios including product galleries, avatars, and hero images by adapting its rendering through the as prop adapter.

How does the as prop adapter pattern work for framework-agnostic image rendering?

The as prop adapter pattern works by accepting a framework-specific component like NextImage as a prop, allowing the framework-agnostic Image interface to delegate rendering while keeping accessibility and styling separated.