OGXOGX

Borders

Border width, radius, and color utilities

Border Width

ClassCSS Output
borderborder-width: 1px
border-0border-width: 0
border-2border-width: 2px
border-4border-width: 4px
border-8border-width: 8px
'border'          // 1px border
'border-2'        // 2px border
'border border-zinc-800' // 1px with color

Border Radius

ClassRadius
rounded4px
rounded-none0
rounded-sm2px
rounded-md6px
rounded-lg8px
rounded-xl12px
rounded-2xl16px
rounded-3xl24px
rounded-full9999px
'rounded-xl'      // 12px radius
'rounded-full'    // Fully rounded (circles)
'rounded-2xl'     // 16px radius

Border Color

Use any Tailwind color for borders:

'border-zinc-800'
'border-white/20'
'border-indigo-500'
'border-[#333333]'

With Opacity

'border-white/10'   // 10% opacity
'border-zinc-500/20' // 20% opacity

Example: Card Border

stack('border border-zinc-800 rounded-2xl p-8 bg-zinc-950', [
  span('text-white', 'Card Content')
])

Example: Avatar

img({
  src: '/avatar.png',
  tw: 'w-16 h-16 rounded-full border-2 border-white'
})

Example: Input Style

div({
  tw: 'border border-zinc-700 rounded-lg px-4 py-2 bg-zinc-900'
}, [
  span('text-zinc-400', 'Placeholder text')
])

On this page