UI Toolbox 로고UI Toolbox
지원

이 페이지는 번역본입니다. 지원과 동영상 튜토리얼은 주로 영어로 제공되며, 영어 페이지가 기준입니다. 영어 버전

Card

Card는 테두리가 있는 컨테이너입니다. 제목, 설명, 오른쪽의 동작이 있는 헤더, 그다음 내용, 그다음 푸터로 이루어집니다.

Day 3 배지, 50에서 500 골드까지 일곱 개의 날짜 타일(처음 둘은 채워짐), Today: 100 gold 줄, Claim 버튼이 있는 Daily reward 카드Day 3 배지, 50에서 500 골드까지 일곱 개의 날짜 타일(처음 둘은 채워짐), Today: 100 gold 줄, Claim 버튼이 있는 Daily reward 카드

헤더 동작과 푸터가 있는 카드를 만드는 방법:

<tb:Card
    title="Plan"
    description="Your plan renews on the first day of each month.">
    <ui:Button text="Change" class="tb-card__action" />
    <ui:Label text="Pro, 5 seats" />
    <ui:Label text="12 GB of 50 GB used" />
    <ui:Button text="Cancel the plan" class="tb-card__footer" />
    <ui:Button text="Add seats" class="tb-card__footer" />
</tb:Card>
var card = new Card
{
    Title = "Plan",
    Description = "Your plan renews on the first day of each month."
};
card.Add(new Label("Pro, 5 seats"));
card.Action.Add(new Button(changePlan) { text = "Change" });
card.Footer.Add(new Button(addSeats) { text = "Add seats" });

제목은 AnimatedLabel이므로 효과 태그가 동작합니다. 빛나는 금색 그라디언트의 전설 제목:

quest.Title = "<gradient=#ff9f1c,#ffe066><shine>"
    + "The Hollow King</shine></gradient>";

이 색은 기본 toolbox 테마처럼 어두운 카드용입니다. 밝은 카드에서는 제목이 4.5:1의 대비를 유지하도록 더 어두운 색을 사용하십시오.

멤버 설명
Title (title) 헤더의 굵은 줄. 제목이 비어 있으면 줄을 보여 주지 않습니다. <wave> 같은 효과 태그가 동작합니다. 태그가 없는 제목은 프레임마다 아무 작업도 하지 않습니다.
Description (description) 제목 아래의 흐린 텍스트. 리치 텍스트 태그가 동작합니다. 설명이 비어 있으면 줄을 보여 주지 않습니다.
Icon (icon) 헤더 왼쪽의 그림으로, 제목과 설명 열의 가운데에 놓입니다. --tb-color-text-muted 색조를 사용합니다. 그림이 없으면 아무것도 표시하지 않고 공간도 차지하지 않습니다.
Action 헤더 오른쪽의 자리. 코드에서 헤더 버튼을 여기에 추가합니다.
Footer 내용 아래의 행. 코드에서 푸터 버튼을 여기에 추가합니다.

설정 페이지 같은 설정 행입니다. 아이콘, 굵은 제목, 흐린 설명, 오른쪽의 분할 선택기로 이루어집니다. 선택기는 액션 슬롯에 넣은 ToggleButtonGroup입니다.

<tb:Card
    icon="project://database/Assets/Icons/density.png"
    title="Density"
    description="How much room the lists take.">
    <ui:ToggleButtonGroup class="tb-card__action"
        allow-empty-selection="false">
        <ui:Button text="Comfortable" />
        <ui:Button text="Compact" />
    </ui:ToggleButtonGroup>
</tb:Card>

팁:

예제에서

스타일

클래스 요소
tb-card 카드: --tb-color-surface 배경, --tb-color-border 테두리, --tb-radius-md 모서리, --tb-spacing-md 패딩.
tb-card__header 텍스트와 동작이 있는 행. 내용이 없으면 숨겨집니다.
tb-card__icon 헤더 왼쪽의 그림. --tb-size-button 크기의 정사각형이고 색은 --tb-color-text-muted입니다. 그림이 없으면 숨깁니다.
tb-card__headings 제목과 설명이 있는 열.
tb-card__title 큰 글꼴 크기의 굵은 제목, tb-animated-label 클래스가 없는 AnimatedLabel.
tb-card__description --tb-color-text-muted의 설명.
tb-card__action-slot 헤더 오른쪽의 행.
tb-card__content 내용 자식의 부모.
tb-card__footer-slot 내용 아래의 행.
tb-card__action 자식을 헤더로 보내려면 자식에 붙이십시오.
tb-card__footer 자식을 푸터로 보내려면 자식에 붙이십시오.
.tb-card {
    padding: 16px;
    background-color: var(--tb-color-surface-alt);
}
.tb-card__footer-slot { justify-content: flex-end; }

CardDemo 장면은 기본값의 일일 보상, 코드로 만든 상점의 아이템 카드, 인장과 목표가 있는 퀘스트, 캐릭터 카드를 보여 줍니다.