Skip to content
Back to skills

Emotion

ASecurity

Emotion 스타일링 규칙. @emotion/styled, css prop 사용, 스타일 파일 분리 기준.

  • 13 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 28, 2026
ai-agentstypescript

Security analysis

A100/100

Scanned May 28, 2026

npx -y skills add ggombee/code-forge --skill emotion --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Emotion?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Emotion
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ggombee-emotion/badge)](https://www.skillsdirectory.com/skills/ggombee-emotion)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: emotion
description: Emotion 스타일링 규칙. @emotion/styled, css prop 사용, 스타일 파일 분리 기준.
---

# Emotion 스타일링 규칙

---

## 기본 규칙

- `@emotion/styled` 또는 `css` prop을 사용한다
- 전역 스타일은 `packages/shared/styles/globalStyles`에만 정의한다

---

## 스타일 컴포넌트 위치 기준

### 간단한 스타일: 컴포넌트 파일 하단

```typescript
// components/OrderCard/index.tsx
const OrderCard = () => {
  return <Container>...</Container>;
};

export default OrderCard;

// 파일 하단에 스타일 정의
const Container = styled.div`
  padding: 16px;
`;
```

### 복잡한 스타일: `*.styled.ts` 파일로 분리

```typescript
// components/OrderCard/styled.ts
export const Container = styled.div`...`;
export const Header = styled.div`...`;
export const Footer = styled.div`...`;

// components/OrderCard/index.tsx - named import 사용
import { Container, Header, Footer } from './styled';
```

---

## 색상 토큰 사용

직접 색상값을 쓰지 않고 semanticColor 토큰을 사용한다:

```typescript
// ✅ 좋은 예
import { semanticColor } from '@repo/shared/styles/foundation/semanticColor';

const StyledDiv = styled.div`
  color: ${semanticColor.text.primary};
  background: ${semanticColor.bg.surface};
`;

// ❌ 나쁜 예
const StyledDiv = styled.div`
  color: #333333;
  background: #ffffff;
`;
```

---

## 파일 명명 규칙

| 유형           | 규칙                    | 예시                       |
| -------------- | ----------------------- | -------------------------- |
| 스타일 파일    | 컴포넌트명.styles       | `OrderCard.styles.ts`      |
| 분리된 스타일  | styled.ts 또는 styled.tsx | `styled.ts`              |

---

## 체크리스트

스타일 작성 전:

- [ ] 스타일 양이 간단한가? → 컴포넌트 파일 하단
- [ ] 스타일이 복잡한가? → `styled.ts`로 분리
- [ ] 직접 색상값(hex, rgb) 없이 semanticColor 토큰 사용?
- [ ] 전역 스타일을 임의로 추가하지 않는가?

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.