부품 본문 구역

구성원 소개 team-grid

의료진·강사·직원 카드. 사진, 직함과 자격(강조색), 이름, 소개 한두 줄, 전문 분야 표식, 짧은 항목, 약력 목록. grid 는 카드를 나란히, list 는 한 사람씩 사진 옆에 학력·경력까지 자세히 놓는다.

  • 나온 곳 온유치과
  • 의료진
  • 강사
  • 직원
  • 팀
  • 프로필
  • 약력

설치

shadcn/ui 를 쓰는 Next.js 프로젝트에서 한 줄로 설치됩니다. 파일은 components/bpublish/team-grid.tsx 로 들어오고, 공통 토큰(base)과 함께 쓰는 부품(section-head)도 같이 설치됩니다. 테마는 테마에서 하나 고릅니다.

npx shadcn@latest add https://www.bpublish.com/r/team-grid.json

레지스트리를 등록했다면 npx shadcn@latest add @bpublish/team-grid · 설치 안내

AI에게 맡기기

Claude Code, Cursor 같은 AI 코딩 도구에 붙여 넣으세요. MCP 서버를 연결해 두면 이름만 말해도 됩니다.

bpublish UI의 구성원 소개(team-grid) 부품으로 만들어 줘. 설치: npx shadcn@latest add https://www.bpublish.com/r/team-grid.json · 문서: https://www.bpublish.com/designs/components/team-grid

사용 예시

app/page.tsx
import { TeamGrid } from '@/components/bpublish/team-grid'

export default function Example() {
  return (
    <TeamGrid
      title="의료진"
      description="보건복지부 인증 전문의 세 명이 진료 분야를 나누어 맡고 있습니다. 처음 상담부터 마지막 점검까지 같은 의사가 봅니다."
      tagsLabel="진료 분야"
      members={[
        {
          role: '대표원장',
          name: '홍길동',
          credential: '치주과 전문의',
          image: '/images/doctor-hong.webp',
          imageAlt: '흰 가운을 입은 홍길동 대표원장',
          intro: '잇몸과 뼈가 버텨 주어야 치아도 임플란트도 오래갑니다. 심기 전에 잇몸부터 살피는 것을 진료 원칙으로 삼고 있습니다.',
          tags: ['임플란트', '잇몸 치료', '충치 · 신경치료'],
          details: [{ label: '진료 요일', value: '월 · 화 · 목 · 금 · 토' }],
          bio: [{ title: '경력', items: ['서울대학교 치의학대학원 치주과학 박사', '서울대학교 치과병원 치주과 임상강사 (2009–2011)', '온유치과 개원, 대표원장 (2011–현재)'] }],
        },
        {
          role: '원장',
          name: '김서연',
          credential: '치과교정과 전문의',
          image: '/images/doctor-kim.webp',
          imageAlt: '흰 가운을 입은 김서연 원장',
          intro: '교정은 2년 가까이 함께 가는 치료입니다. 시작 전에 예상 기간과 비용, 생활에서 달라지는 점을 빠짐없이 말씀드립니다.',
          tags: ['투명 교정', '성인 교정', '미백'],
          details: [{ label: '진료 요일', value: '월 · 화 · 수 · 금 · 토' }],
          bio: [{ title: '경력', items: ['연세대학교 대학원 치과교정학 석사', '대한치과교정학회 인정의', '온유치과 원장 (2016–현재)'] }],
        },
        {
          role: '원장',
          name: '이도윤',
          credential: '소아치과 전문의',
          image: '/images/doctor-lee.webp',
          imageAlt: '흰 가운을 입은 이도윤 원장',
          intro: '아이가 치과를 무섭지 않은 곳으로 기억하면 어른이 되어서도 검진을 거르지 않습니다. 첫 진료는 치료보다 적응을 먼저 합니다.',
          tags: ['소아 충치 치료', '예방 진료', '성장기 교정 상담'],
          details: [{ label: '진료 요일', value: '월 · 화 · 수 · 목 · 금' }],
          bio: [{ title: '경력', items: ['경희대학교 대학원 소아치과학 석사', '경희대학교 치과병원 소아치과 임상교수 (2017–2019)', '온유치과 원장 (2019–현재)'] }],
        },
      ]}
    />
  )
}

속성

이름형식기본값설명
members필수{ name; role?; credential?; image?; imageAlt?; intro?; tags?: string[]; details?: { label; value }[]; bio?: { title?; items: string[] }[]; href? }[]—구성원 목록
titlestring—구역 제목
eyebrowstring—제목 위 영문 소제목
descriptionstring—제목 옆 설명
layout'grid' | 'list''grid'grid: 카드 나란히 / list: 한 사람씩 자세히
columns2 | 3 | 43grid 의 넓은 화면 열 수
tagsLabelstring'전문 분야'전문 분야 표식의 이름

원본 코드

설치 명령 없이 그대로 복사해 넣어도 됩니다. React 외의 패키지는 쓰지 않습니다.

components/bpublish/team-grid.tsx
/**
 * bpublish UI — 구성원 소개. https://www.bpublish.com/designs/components/team-grid
 * 의료진·강사·직원 카드. 사진, 직함과 자격, 이름, 소개 한두 줄, 전문 분야 표식, 약력 목록.
 * grid 는 카드를 나란히, list 는 한 사람씩 사진 옆에 자세히(원장 소개 페이지처럼) 놓는다.
 */
import { SectionHead } from './section-head'

export type TeamMember = {
  name: string
  /** 직함 (대표원장, 수석 강사 …) */
  role?: string
  /** 자격·전공. 강조색으로 붙는다 (치주과 전문의 …) */
  credential?: string
  image?: string
  imageAlt?: string
  /** 소개 한두 줄 */
  intro?: string
  /** 전문 분야 표식 */
  tags?: string[]
  /** 짧은 항목 (진료 요일, 담당 반 …) */
  details?: { label: string; value: string }[]
  /** 약력 묶음 (학력, 경력 …) */
  bio?: { title?: string; items: string[] }[]
  /** 자세히 보기 주소. 주면 이름이 링크가 된다 */
  href?: string
}

export type TeamGridProps = {
  members: TeamMember[]
  title?: string
  eyebrow?: string
  description?: string
  /** grid: 카드 나란히 / list: 한 사람씩 자세히 */
  layout?: 'grid' | 'list'
  /** grid 의 넓은 화면 열 수 */
  columns?: 2 | 3 | 4
  /** 전문 분야 이름 (list 에서 항목 이름으로, grid 에서 읽어 주는 이름으로) */
  tagsLabel?: string
  className?: string
}

const cols = { 2: 'sm:grid-cols-2', 3: 'sm:grid-cols-2 lg:grid-cols-3', 4: 'sm:grid-cols-2 lg:grid-cols-4' }

function Photo({ m, className = '' }: { m: TeamMember; className?: string }) {
  return (
    <div className={`aspect-[4/5] overflow-hidden rounded-lg bg-muted ${className}`}>
      {m.image ? <img src={m.image} alt={m.imageAlt ?? m.name} loading="lazy" className="h-full w-full object-cover" /> : null}
    </div>
  )
}

function Title({ m, className }: { m: TeamMember; className: string }) {
  return (
    <>
      {m.role || m.credential ? (
        <p className="text-sm text-muted-foreground">
          {m.role}
          {m.role && m.credential ? (
            <span aria-hidden className="mx-2.5 text-border">
              |
            </span>
          ) : null}
          {m.credential ? <span className="font-medium text-primary">{m.credential}</span> : null}
        </p>
      ) : null}
      <h3 className={`heading ${className}`}>
        {m.href ? (
          <a href={m.href} className="transition-colors hover:text-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring">
            {m.name}
          </a>
        ) : (
          m.name
        )}
      </h3>
    </>
  )
}

function Dashes({ items, className = '' }: { items: string[]; className?: string }) {
  return (
    <ul className={`space-y-2 leading-[1.7] text-muted-foreground tabular-nums ${className}`}>
      {items.map((x) => (
        <li key={x} className="flex gap-3">
          <span aria-hidden className="mt-[0.8em] h-px w-3 shrink-0 bg-muted-foreground/60" />
          {x}
        </li>
      ))}
    </ul>
  )
}

function Card({ m, tagsLabel }: { m: TeamMember; tagsLabel: string }) {
  return (
    <li className="flex flex-col">
      <Photo m={m} />
      <div className="mt-6">
        <Title m={m} className="mt-2 text-[1.625rem] leading-tight md:text-[1.75rem]" />
        {m.intro ? <p className="mt-4 text-[15px] leading-7 text-muted-foreground">{m.intro}</p> : null}
        {m.tags?.length ? (
          <ul aria-label={tagsLabel} className="mt-5 flex flex-wrap gap-1.5">
            {m.tags.map((t) => (
              <li key={t} className="rounded-full bg-accent px-3 py-1 text-[13px] font-medium text-accent-foreground">
                {t}
              </li>
            ))}
          </ul>
        ) : null}
        {m.details?.length ? (
          <dl className="mt-6 border-t border-border">
            {m.details.map((d) => (
              <div key={d.label} className="grid grid-cols-[5.5rem_1fr] gap-3 border-b border-border py-3 text-sm">
                <dt className="text-muted-foreground">{d.label}</dt>
                <dd className="font-medium tabular-nums">{d.value}</dd>
              </div>
            ))}
          </dl>
        ) : null}
        {m.bio?.map((b, i) => (
          <div key={b.title ?? i} className="mt-6">
            {b.title ? <p className="text-[13px] font-medium text-foreground">{b.title}</p> : null}
            <Dashes items={b.items} className={`text-[14px] ${b.title ? 'mt-3' : ''}`} />
          </div>
        ))}
      </div>
    </li>
  )
}

function Row({ m, tagsLabel }: { m: TeamMember; tagsLabel: string }) {
  const facts = [...(m.tags?.length ? [{ label: tagsLabel, value: m.tags.join(', ') }] : []), ...(m.details ?? [])]
  return (
    <li className="grid gap-10 border-t border-foreground pt-8 md:grid-cols-12">
      <Photo m={m} className="md:col-span-4" />
      <div className="md:col-span-7 md:col-start-6">
        <Title m={m} className="mt-3 text-4xl md:text-[2.75rem]" />
        {m.intro ? <p className="mt-6 max-w-xl text-[15.5px] leading-[1.85] text-muted-foreground md:text-base">{m.intro}</p> : null}
        {facts.length ? (
          <dl className="mt-10 grid border-t border-border sm:grid-cols-2">
            {facts.map((f, i) => (
              <div key={f.label} className={`border-b border-border py-4 ${i % 2 ? 'sm:border-l sm:pl-6' : 'sm:pr-6'}`}>
                <dt className="text-[13px] text-muted-foreground">{f.label}</dt>
                <dd className="mt-1.5 text-[15px] font-medium tabular-nums">{f.value}</dd>
              </div>
            ))}
          </dl>
        ) : null}
        {m.bio?.length ? (
          <div className="mt-10 grid gap-10 sm:grid-cols-2 sm:gap-6">
            {m.bio.map((b, i) => (
              <div key={b.title ?? i}>
                {b.title ? <p className="text-sm font-medium text-foreground">{b.title}</p> : null}
                <Dashes items={b.items} className={`text-[14.5px] ${b.title ? 'mt-4' : ''}`} />
              </div>
            ))}
          </div>
        ) : null}
      </div>
    </li>
  )
}

export function TeamGrid({ members, title, eyebrow, description, layout = 'grid', columns = 3, tagsLabel = '전문 분야', className = '' }: TeamGridProps) {
  return (
    <section className={`py-16 md:py-24 ${className}`}>
      <div className="shell">
        {title ? <SectionHead title={title} eyebrow={eyebrow} description={description} className="mb-12 md:mb-16" /> : null}
        {layout === 'list' ? (
          <ul className="space-y-20 md:space-y-28">
            {members.map((m) => (
              <Row key={m.name} m={m} tagsLabel={tagsLabel} />
            ))}
          </ul>
        ) : (
          <ul className={`grid gap-x-8 gap-y-16 ${cols[columns]}`}>
            {members.map((m) => (
              <Card key={m.name} m={m} tagsLabel={tagsLabel} />
            ))}
          </ul>
        )}
      </div>
    </section>
  )
}

함께 쓰는 부품