styling

Standardize CapUI component styling using props, semantic tokens, and the sx prop.

26|7|Updated Apr 21, 2022
One-click install
npx skills add https://github.com/cap-collectif/cap-collectif --skill styling-cap-collectif
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: styling
Source: https://github.com/cap-collectif/cap-collectif/tree/main/.claude/skills/styling
Command: npx skills add https://github.com/cap-collectif/cap-collectif --skill styling-cap-collectif

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ce Skill fournit les règles et conventions nécessaires pour styliser rapidement et de manière cohérente les composants CapUI dans une application, afin d'assurer une apparence uniforme et une meilleure expérience utilisateur.

Core Features & Use Cases

  • Guide de styling pour les composants CapUI couvrant layout, spacing, couleurs, theming et responsiveness.
  • Recommandations pour éviter styled-components et privilégier les props CapUI et le prop sx pour les styles personnalisés.
  • Cas d'usage typiques: création de pages cohérentes, theming d'une application, adaptation mobile.

Quick Start

Appliquez les contraintes CapUI pour styler un composant en respectant la charte et la cohérence visuelle.

Frequently Asked Questions about styling

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

FAQPage Schema
How do I style React components consistently without styled-components?

To style React components consistently without styled-components, use the CapUI sx prop for custom styling. This approach enforces semantic tokens and component props to maintain a uniform look and feel across your application.

What is the best way to apply responsive design and theming in a React design system?

The best way to apply responsive design and theming in a React design system is to use CapUI semantic tokens and responsive patterns. This standardizes layout, spacing, and colors across dashboards and content surfaces.

How do I standardize UI styling across CapUI components for layouts and forms?

You standardize UI styling across CapUI components by applying CapUI props for layout, spacing, and colors. This ensures consistent visual coherence for forms and dashboards by leveraging the design system's built-in properties.

Can I use styled-components for custom styling with CapUI in React applications?

Using styled-components with CapUI in React applications is discouraged. Instead, you should use the sx prop and native CapUI props to apply custom styles and maintain design system consistency.

When do I need to use semantic tokens for frontend UI styling?

You need to use semantic tokens for frontend UI styling when enforcing a consistent design system like CapUI. They standardize colors and spacing across React components, ensuring visual uniformity across different surfaces.

Why does my React application look inconsistent across different pages and devices?

Your React application likely looks inconsistent due to non-standard styling methods. Following CapUI conventions for responsive behavior, semantic tokens, and the sx prop enforces a uniform look and feel across all pages and devices.