Jetpack Compose API의 스타일 가이드라인
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
앱용 Compose 코드를 작성하거나 Compose 라이브러리 및 API를 빌드하는 경우 권장사항을 따라 코드를 확장 가능하고 성능이 우수하며 나머지 생태계와 일관되게 만드세요.
다음 문서에서는 Compose를 사용하는 코드를 작성하는 모든 사용자를 위한 가이드라인을 제공합니다.
- Jetpack Compose API 가이드라인: Jetpack Compose 컴파일러 플러그인과 런타임을 사용하는 모든 시스템의 패턴, 권장사항, 규범적 스타일 가이드라인을 설명합니다. 여기에는 다음 주제가 포함됩니다.
- Kotlin 코딩 규칙에 기반한 Compose용 Kotlin 스타일 가이드라인
- Compose 런타임 기능을 기반으로 하는
@Composable
함수 및 API에 관한 안내
- Compose UI 툴킷을 사용하고 확장하는 API 가이드라인
- Compose API 설계 시 사용 사례를 처리하는 패턴
- Jetpack Compose의
@Composable
구성요소 API 가이드라인: 다음 주제를 비롯하여 @Composable
UI 구성요소를 만들고 사용하는 데 관한 가이드라인 및 권장사항을 제공합니다.
- 구성요소 만들기 및 레이어링
- 새 구성요소 이름 지정
- 구성요소 종속 항목 표현
@Composable
구성요소의 매개변수
- 구성요소 관련 클래스와 함수를 만드는 올바른 패턴 따르기
@Composable
구성요소 문서화
- 구성요소의 접근성 개선
- 하위 호환성을 유지하면서 구성요소 API 업데이트
대상
이 가이드라인은 다음 세 가지 대상을 위해 작성되었습니다.
- Jetpack Compose를 기반으로 앱을 빌드하는 개발자 앱의 일부에서 Jetpack Compose를 사용하는 경우 이 그룹에 속합니다.
- Jetpack Compose 프레임워크 개발에 참여하는 개발자
androidx.compose
라이브러리에 기여하는 경우 이 그룹에 속합니다.
- Jetpack Compose를 기반으로 라이브러리를 만드는 개발자 Compose API 또는 Compose UI 요소 라이브러리를 만드는 경우 이 그룹에 속합니다. 이러한 Compose 구성요소 라이브러리는 공개적으로 제공되거나 회사 또는 팀에 로컬로 제공될 수 있습니다.
속한 그룹에 따라 각 스타일 가이드라인의 엄격성 수준이 다릅니다. 예를 들어 Jetpack Compose 프레임워크 개발은 일반적으로 이러한 가이드라인을 가장 엄격하게 준수합니다.
각 개발자 잠재고객의 요구사항에 대한 자세한 내용은 RFC2119를 참고하세요.
프레임워크 및 가이드라인에 기여
androidx
코드베이스의 일부 라이브러리와 스타일 가이드 (Compose API 가이드 및 @Composable
구성요소 가이드)에 대한 기여는 환영합니다.
참여하려면 androidx
참여 가이드의 안내를 따르세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[null,null,["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["If you're writing Compose code for your app or building Compose libraries and\nAPIs, follow best practices to make your code scalable, more performant, and\nconsistent with the rest of the ecosystem.\n\nThe following documents provide guidelines for anyone writing code that uses\nCompose:\n\n- [API Guidelines for Jetpack Compose](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-api-guidelines.md): Outlines patterns, best practices, and prescriptive style guidelines for any system using the Jetpack Compose compiler plugin and runtime. It includes the following topics:\n - Kotlin style guidelines for Compose, based on the [Kotlin Coding\n Conventions](https://kotlinlang.org/docs/coding-conventions.html)\n - Guidance for `@Composable` functions and APIs that build on the Compose runtime capabilities\n - Guidelines for APIs that use and extend the Compose UI toolkit\n - Patterns for addressing use cases when designing a Compose API\n- [API Guidelines for `@Composable` components in Jetpack Compose](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-component-api-guidelines.md): Provides a set of guidelines and recommendations for creating and using `@Composable` UI components, including the following topics:\n - Creating and layering components\n - Naming a new component\n - Expressing component dependencies\n - Parameters in `@Composable` components\n - Following correct patterns for creating component-related classes and functions\n - Documenting `@Composable` components\n - Improving accessibility for components\n - Updating component APIs while retaining backwards compatibility\n\nAudience\n\nThese guidelines are written for the following three audiences:\n\n- **Developers building apps based on Jetpack Compose**. You are in this group if you use Jetpack Compose in some part of your app.\n- **Developers working on Jetpack Compose framework development** . You are in this group if you make contributions to the [`androidx.compose` libraries](/jetpack/androidx/releases/compose).\n- **Developers creating libraries based on Jetpack Compose**. You are in this group if you create Compose APIs or libraries of Compose UI elements. These libraries of Compose components may be publicly available or local to your company or team.\n\nDepending on the group you're in, you have different strictness levels for each\nstyle guideline. For example, Jetpack Compose framework development generally\nadheres most strictly to these guidelines.\n\nFor more information about the requirements for each developer audience, see\n[RFC2119](https://www.ietf.org/rfc/rfc2119.txt).\n\nContribute to framework and guidelines\n\nWe welcome contributions to select libraries in the `androidx` codebase and the\nstyle guidelines ([Compose API guidelines](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-api-guidelines.md) and\n[`@Composable` components guidelines](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-component-api-guidelines.md)) themselves.\n\nTo contribute, follow the instructions in the `androidx` [contribution\nguide](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/CONTRIBUTING.md)."]]