cpn-basic-box

Configure UDesign Box props to build responsive frontend layouts.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/UCloud-FE/udesign-cli --skill cpn-basic-box
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpn-basic-box
Source: https://github.com/UCloud-FE/udesign-cli/tree/main/skills/cpn-basic-box
Command: npx skills add https://github.com/UCloud-FE/udesign-cli --skill cpn-basic-box

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps AI correctly use the UDesign Box component to address frontend layout and styling challenges by providing a concise set of patterns and rules that align with the design system.

Core Features & Use Cases

  • Container-based layout: supports common Box props like direction, spacing, wrap, alignItems, justifyContent for building responsive layouts.
  • Practical patterns: demonstrates grid-like spans, card layouts, and flex arrangements using Box components.
  • Best practices: enforces design-system-compliant usage and prevents leakage of raw HTML styles by preferring UDesign primitives.

Quick Start

Provide a simple Box-based layout example that shows a container with spacing and wrap to form a responsive grid.

Frequently Asked Questions about cpn-basic-box

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

FAQPage Schema
How do I build responsive layouts in React using a design systemBox component?

Build responsive layouts in React by configuring the design system Box component with props like direction, spacing, wrap, alignItems, and justifyContent. This approach enforces design-system compliance and prevents raw HTML style leakage.

What is the best way to create a card grid with flexbox in a React design system?

The best way to create a card grid is using the Box component's flex and span props. This enables grid-like arrangements and practical patterns while maintaining design system alignment without writing custom CSS.

Can I use Box props for container-based layouts without raw CSS in React?

Yes, Box props support container-based layouts entirely without raw CSS. You can utilize padding, width, height, and flex properties to structure flexible containers across React-based projects.

How do I align items and control spacing in frontend layout containers?

Align items and control spacing in frontend layout containers by applying the alignItems, justifyContent, and spacing props directly to the Box component, ensuring consistent design-system styling.

Why does my Box layout not wrap elements correctly in React?

Box layout wrapping issues in React often occur when the wrap prop is not enabled. Apply the wrap property to the container to ensure flex items move to the next line responsively.