Section header

콘텐츠 영역이나 특정 섹션의 시작을 명확하게 알려주는 제목 요소입니다. 섹션의 주제를 설명하고 추가 정보나 관련 페이지로 이동할 수 있는 링크를 함께 제공하여 탐색을 쉽게 할 수 있도록 돕습니다.

@MainActor struct SectionHeader

Overview

SectionHeader는 콘텐츠를 논리적으로 구분하는 섹션 제목을 표시하며, 선택적으로 추가 액션이나 정보를 제공할 수 있습니다.

// 기본 섹션 헤더
SectionHeader(title: "추천 콘텐츠")

// 부제목이 있는 섹션 헤더
SectionHeader(title: "인기 영화", subtitle: "이번 주 TOP 10")

// 더보기 버튼이 있는 섹션 헤더
SectionHeader(title: "최신 업데이트", hasMoreButton: true) {
    print("더보기 버튼 클릭됨")
}

// 커스텀 트레일링 컨텐츠가 있는 섹션 헤더
SectionHeader(title: "카테고리") {
    Text("필터")
        .font(.caption)
        .foregroundColor(.blue)
}

Topics

Initializers

init(title: String)

섹션 헤더를 초기화합니다.

  • Parameters
    ParameterDescription
    title표시할 섹션 제목

Instance Properties

var body: some View

뷰의 내용과 동작을 정의합니다.

Instance Methods

func headingContent<V>(() -> V) -> SectionHeader

헤더 타이틀 옆에 추가 콘텐츠를 표시합니다.

  • Parameters

    ParameterDescription
    content표시할 콘텐츠를 생성하는 클로저
  • Return Value

    수정된 SectionHeader 인스턴스

  • Discussion

    타이틀 텍스트 바로 옆(오른쪽)에 추가 콘텐츠나 뱃지를 표시할 때 사용합니다.

func size(Size) -> SectionHeader

섹션 헤더의 크기를 설정합니다.

  • Parameters

    ParameterDescription
    size적용할 헤더 크기
  • Return Value

    수정된 SectionHeader 인스턴스

  • Discussion

    크기에 따라 폰트 크기와 높이가 자동으로 조정됩니다. xsmall 크기를 선택하면 타이틀 색상이 .labelAlternative로 변경됩니다.

func titleColor(SwiftUI.Color) -> SectionHeader

타이틀 텍스트의 색상을 설정합니다.

  • Parameters

    ParameterDescription
    color적용할 텍스트 색상
  • Return Value

    수정된 SectionHeader 인스턴스

func trailingContent<V>(() -> V) -> SectionHeader

헤더의 오른쪽에 추가적인 콘텐츠를 표시합니다.

  • Parameters

    ParameterDescription
    content표시할 콘텐츠를 생성하는 클로저
  • Return Value

    수정된 SectionHeader 인스턴스

  • Discussion

    더보기 버튼이나 필터 등의 추가 기능을 제공할 때 사용합니다.

Enumerations

enum Size

섹션 헤더의 크기를 정의하는 열거형입니다.

Enumeration Cases

case large

큰 크기

case medium

중간 크기

case small

작은 크기

case xsmall

가장 작은 크기

Relationships

Conforms To

Swift.Sendable

SwiftUICore.View

© 2026 Wanted Lab, Inc.