Search

Tailwind - Border

Tailwind - Border

β€’
border
β€’
κΈ°λ³Έκ°’
β€’
ν…Œλ‘λ¦¬ λ‘κ»˜
β€’
ν…Œλ‘λ¦¬ 색상
β€’
ν…Œλ‘λ¦¬ μŠ€νƒ€μΌ
β€’
ν…Œλ‘λ¦¬ λ°©ν–₯
β€’
border-radius

border

border λŠ” ν…Œλ‘λ¦¬ μŠ€νƒ€μΌ 속성이며, tailwind μ—μ„œλŠ” μŠ€νƒ€μΌ 클래슀둜 μ§€μ •λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. class 에 border 만 μž‘μ„±ν•΄λ„ κΈ°λ³Έ ν…Œλ‘λ¦¬λ₯Ό 지정할 수 μžˆμŠ΅λ‹ˆλ‹€.

κΈ°λ³Έκ°’

κ·Έλƒ₯ border 클래슀만 μ§€μ •ν•˜λ©΄, 1px λ‘κ»˜ 및 gray 컬러λ₯Ό 기본으둜 ν…Œλ‘λ¦¬κ°€ μ§€μ •λ©λ‹ˆλ‹€.

ν…Œλ‘λ¦¬ λ‘κ»˜

border-λ‘κ»˜

λ‘κ»˜ κΈ°λ³Έ λ‹¨μœ„

β€’
border: 1px λ‘κ»˜μ˜ κΈ°λ³Έ ν…Œλ‘λ¦¬
β€’
border-2: 2px λ‘κ»˜μ˜ ν…Œλ‘λ¦¬
β€’
border-4: 4px λ‘κ»˜μ˜ ν…Œλ‘λ¦¬
β€’
border-8: 8px λ‘κ»˜μ˜ ν…Œλ‘λ¦¬

λ‘κ»˜ μ»€μŠ€ν…€ 지정

border-[크기px]
[ ] 기호λ₯Ό μž‘μ„±ν•˜λ©΄, μ›ν•˜λŠ” 크기 λ‹¨μœ„λ‘œ λ‘κ»˜λ₯Ό μ§€μ •ν• μˆ˜ μžˆμŠ΅λ‹ˆλ‹€.
[크기px] 기호의 μ‚¬μš©μ€ border λΏλ§Œμ•„λ‹ˆλΌ 크기λ₯Ό μ§€μ •ν•˜λŠ” ν΄λž˜μŠ€μ—μ„œ μ œκ³΅λ˜λŠ” λ‹¨μœ„κ°€ μ•„λ‹Œ, 직접 μ§€μ •ν•˜λŠ” 크기둜 크기가 μ μš©λ˜λŠ” λͺ¨λ“  ν΄λž˜μŠ€μ—μ„œ ν†΅μš©λ©λ‹ˆλ‹€.
<div className="m-10 inline-block w-[480px]"> <div className="border-[10px] p-4 rounded-lg shadow-md space-y-4 animate-pulse"> <div className="h-60 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="space-y-2"> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> </div> </div> </div>
JavaScript
볡사

ν…Œλ‘λ¦¬ 색상

border-컬러-음영 border-[#000000]
ν…Œλ‘λ¦¬ 색상은 border-컬러 ν˜•νƒœλ‘œ μ»¬λŸ¬μƒ‰μƒ 이름을 μ§€μ •ν•˜κ³ , border-컬러-음영 ν˜•νƒœλ‘œ μ§€μ •ν•˜λŠ” κ²½μš°μ—λŠ” μŒμ˜μ„ 100~900 으둜 100 λ‹¨μœ„λ‘œ 지정할 수 μžˆμŠ΅λ‹ˆλ‹€.
β€’
100: 맀우 밝은 색상
β€’
200: 밝은 색상
β€’
300: 쀑간 밝기의 색상
β€’
400: μ•½κ°„ μ–΄λ‘μš΄ 색상
β€’
500: κΈ°λ³Έ 색상
β€’
600: μ•½κ°„ μ–΄λ‘μš΄ 색상
β€’
700: 쀑간 μ–΄λ‘μš΄ 색상
β€’
800: μ–΄λ‘μš΄ 색상
β€’
900: 맀우 μ–΄λ‘μš΄ 색상
또, μ§€μ •ν•œ μƒ‰μƒμ½”λ“œλ‘œ ν…Œλ‘λ¦¬λ₯Ό μ£Όκ³  μ‹Άλ‹€λ©΄, border-[#000000] ν˜•νƒœλ‘œ νŠΉμ •ν•œ 색상을 지정할 μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.
<div className="m-10 inline-block w-[480px]"> <div className="border-[10px] border-blue-500 p-4 rounded-lg shadow-md space-y-4 animate-pulse"> <div className="h-60 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="space-y-2"> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> </div> </div> </div>
JavaScript
볡사
<div className="m-10 inline-block w-[480px]"> <div className="border-[10px] border-[#ffc2ff] p-4 rounded-lg shadow-md space-y-4 animate-pulse"> <div className="h-60 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="space-y-2"> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> </div> </div> </div>
JavaScript
볡사

ν…Œλ‘λ¦¬ μŠ€νƒ€μΌ

ν…Œλ‘λ¦¬ μŠ€νƒ€μΌμ€ solide~none κΉŒμ§€ λΈŒλΌμš°μ €μ˜ 지원 μŠ€νƒ€μΌμ— 따라 지정할 수 μžˆμŠ΅λ‹ˆλ‹€.
클래슀
μ„€λͺ…
border-solid
μ‹€μ„  ν…Œλ‘λ¦¬
border-dashed
λŒ€μ‹œ μŠ€νƒ€μΌ ν…Œλ‘λ¦¬
border-dotted
점선 μŠ€νƒ€μΌ ν…Œλ‘λ¦¬
border-double
이쀑 μ„  ν…Œλ‘λ¦¬
border-none
ν…Œλ‘λ¦¬ μ—†μŒ
<div className="m-10 inline-block w-[480px]"> <div className="border-[10px] border-blue-500 border-dashed p-4 rounded-lg shadow-md space-y-4 animate-pulse"> <div className="h-60 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="space-y-2"> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> <div className="h-4 bg-gradient-to-r from-gray-300 via-gray-200 to-gray-300 rounded"></div> </div> </div> </div>
JavaScript
볡사

ν…Œλ‘λ¦¬ λ°©ν–₯

클래슀
μ„€λͺ…
border-t
상단 ν…Œλ‘λ¦¬ 적용
border-r
우츑 ν…Œλ‘λ¦¬ 적용
border-b
ν•˜λ‹¨ ν…Œλ‘λ¦¬ 적용
border-l
쒌츑 ν…Œλ‘λ¦¬ 적용
border-x
쒌우 ν…Œλ‘λ¦¬ 적용
border-y
μƒν•˜ ν…Œλ‘λ¦¬ 적용

border-radius

클래슀
μ„€λͺ…
rounded-sm
μž‘μ€ λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (0.125rem / 2px)
rounded
κΈ°λ³Έ λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (0.25rem / 4px)
rounded-md
쀑간 λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (0.375rem / 6px)
rounded-lg
큰 λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (0.5rem / 8px)
rounded-xl
더 큰 λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (0.75rem / 12px)
rounded-2xl
맀우 큰 λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (1rem / 16px)
rounded-3xl
μ΅œλŒ€ λ‘₯κ·Ό λͺ¨μ„œλ¦¬ (1.5rem / 24px)
rounded-full
μ™„μ „ λ‘₯κΈ€κ²Œ (μ›ν˜•)
rounded-t-sm
상단 λͺ¨μ„œλ¦¬λ§Œ μž‘μ€ λ‘₯κΈ€κΈ°
rounded-r-sm
우츑 λͺ¨μ„œλ¦¬λ§Œ μž‘μ€ λ‘₯κΈ€κΈ°
rounded-b-sm
ν•˜λ‹¨ λͺ¨μ„œλ¦¬λ§Œ μž‘μ€ λ‘₯κΈ€κΈ°
rounded-l-sm
쒌츑 λͺ¨μ„œλ¦¬λ§Œ μž‘μ€ λ‘₯κΈ€κΈ°
rounded-t-md
상단 λͺ¨μ„œλ¦¬λ§Œ 쀑간 λ‘₯κΈ€κΈ°
rounded-r-md
우츑 λͺ¨μ„œλ¦¬λ§Œ 쀑간 λ‘₯κΈ€κΈ°
rounded-b-md
ν•˜λ‹¨ λͺ¨μ„œλ¦¬λ§Œ 쀑간 λ‘₯κΈ€κΈ°
rounded-l-md
쒌츑 λͺ¨μ„œλ¦¬λ§Œ 쀑간 λ‘₯κΈ€κΈ°
rounded-t-lg
상단 λͺ¨μ„œλ¦¬λ§Œ 큰 λ‘₯κΈ€κΈ°
rounded-r-lg
우츑 λͺ¨μ„œλ¦¬λ§Œ 큰 λ‘₯κΈ€κΈ°
rounded-b-lg
ν•˜λ‹¨ λͺ¨μ„œλ¦¬λ§Œ 큰 λ‘₯κΈ€κΈ°
rounded-l-lg
쒌츑 λͺ¨μ„œλ¦¬λ§Œ 큰 λ‘₯κΈ€κΈ°
rounded-t-xl
상단 λͺ¨μ„œλ¦¬λ§Œ 더 큰 λ‘₯κΈ€κΈ°
rounded-r-xl
우츑 λͺ¨μ„œλ¦¬λ§Œ 더 큰 λ‘₯κΈ€κΈ°
rounded-b-xl
ν•˜λ‹¨ λͺ¨μ„œλ¦¬λ§Œ 더 큰 λ‘₯κΈ€κΈ°
rounded-l-xl
쒌츑 λͺ¨μ„œλ¦¬λ§Œ 더 큰 λ‘₯κΈ€κΈ°
rounded-t-2xl
상단 λͺ¨μ„œλ¦¬λ§Œ 맀우 큰 λ‘₯κΈ€κΈ°
rounded-r-2xl
우츑 λͺ¨μ„œλ¦¬λ§Œ 맀우 큰 λ‘₯κΈ€κΈ°
rounded-b-2xl
ν•˜λ‹¨ λͺ¨μ„œλ¦¬λ§Œ 맀우 큰 λ‘₯κΈ€κΈ°
rounded-l-2xl
쒌츑 λͺ¨μ„œλ¦¬λ§Œ 맀우 큰 λ‘₯κΈ€κΈ°
rounded-t-3xl
상단 λͺ¨μ„œλ¦¬λ§Œ μ΅œλŒ€ λ‘₯κΈ€κΈ°
rounded-r-3xl
우츑 λͺ¨μ„œλ¦¬λ§Œ μ΅œλŒ€ λ‘₯κΈ€κΈ°
rounded-b-3xl
ν•˜λ‹¨ λͺ¨μ„œλ¦¬λ§Œ μ΅œλŒ€ λ‘₯κΈ€κΈ°
rounded-l-3xl
쒌츑 λͺ¨μ„œλ¦¬λ§Œ μ΅œλŒ€ λ‘₯κΈ€κΈ°
rounded-full
μ™„μ „ μ›ν˜• λͺ¨μ„œλ¦¬