본문으로 건너뛰기

Choice Card ​

Choice Card는 제목과 설명이 붙은 카드 가운데 하나를 고르는 선택 요소입니다. 주로 요금제, 배포 방식, 데이터 유형처럼 고르기 전에 선택지의 차이를 읽어 봐야 하는 경우에 사용됩니다. 설명을 함께 보여 주어 사용자가 각 선택지를 비교한 뒤 결정할 수 있습니다.

State ​

Code ​

vue
<script setup>
import { ref } from 'vue'
import { AChoiceCard } from '@mobigen/rnd-design-system'

const value = ref('kubernetes')
const options = [
  { value: 'kubernetes', title: 'Kubernetes', description: 'Run GPU workloads on a K8s cluster.' },
  { value: 'vm', title: 'Virtual Machine', description: 'Access a cluster to run GPU workloads.' },
  { value: 'bare-metal', title: 'Bare Metal', description: '현재 리전에서 이용할 수 없습니다.', disabled: true }
]
</script>

<template>
  <AChoiceCard v-model="value" :options="options" />
  <AChoiceCard v-model="value" :options="options" orientation="horizontal" />
</template>

Props ​

속성값
modelValueString, Number
optionsArray ({ value, title, description, disabled }[]) (필수)
ariaLabelString
nameString
orientationvertical, horizontal
disabledtrue, false

Events ​

이벤트전달 값
update:modelValue옵션의 value