Component

Checkbox Styled Input

Styled checkbox components with various designs and descriptions

  • Component
  • Tailwind
  • MIT

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.site/library/tailwind/components/input/checkbox-styled/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Input/checkbox-styled
registry path: Tailwind/Components/Input/checkbox-styled

Source

Implementation

code.html
<!-- Checkbox - Default Styled -->
<div class="space-y-3">
  <label class="flex items-center gap-3 cursor-pointer">
    <input type="checkbox" class="w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
    <span class="text-sm text-gray-700">Accept terms and conditions</span>
  </label>
  <label class="flex items-center gap-3 cursor-pointer">
    <input type="checkbox" checked class="w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
    <span class="text-sm text-gray-700">Subscribe to newsletter</span>
  </label>
  <label class="flex items-center gap-3 cursor-pointer">
    <input type="checkbox" disabled class="w-5 h-5 rounded border-gray-300 text-gray-400" />
    <span class="text-sm text-gray-400">Disabled checkbox</span>
  </label>
</div>

<!-- Checkbox - Custom Styled -->
<div class="mt-6 space-y-3">
  <label class="flex items-center gap-3 cursor-pointer group">
    <div class="w-6 h-6 rounded-md border-2 border-gray-300 bg-white flex items-center justify-center transition-colors group-hover:border-blue-400">
      <input type="checkbox" class="sr-only" />
      <svg class="w-4 h-4 text-white hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7" />
      </svg>
    </div>
    <span class="text-sm text-gray-700">Custom checkbox (click me)</span>
  </label>
  <label class="flex items-center gap-3 cursor-pointer group">
    <div class="w-6 h-6 rounded-full border-2 border-gray-300 bg-white flex items-center justify-center transition-colors group-hover:border-purple-400 peer-checked:bg-purple-500">
      <input type="checkbox" class="sr-only" checked />
      <svg class="w-3 h-3 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7" />
      </svg>
    </div>
    <span class="text-sm text-gray-700">Round checkbox (checked)</span>
  </label>
</div>

<!-- Checkbox - List with Description -->
<div class="mt-6 p-4 bg-gray-50 rounded-xl space-y-4">
  <label class="flex items-start gap-3 cursor-pointer">
    <input type="checkbox" checked class="w-5 h-5 mt-0.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
    <div>
      <span class="text-sm font-medium text-gray-900">Marketing emails</span>
      <p class="text-xs text-gray-500 mt-0.5">Receive updates about products and features</p>
    </div>
  </label>
  <label class="flex items-start gap-3 cursor-pointer">
    <input type="checkbox" class="w-5 h-5 mt-0.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
    <div>
      <span class="text-sm font-medium text-gray-900">Security alerts</span>
      <p class="text-xs text-gray-500 mt-0.5">Get notified about important security updates</p>
    </div>
  </label>
  <label class="flex items-start gap-3 cursor-pointer">
    <input type="checkbox" checked class="w-5 h-5 mt-0.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
    <div>
      <span class="text-sm font-medium text-gray-900">Weekly digest</span>
      <p class="text-xs text-gray-500 mt-0.5">Summary of your weekly activity</p>
    </div>
  </label>
</div>
62 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://components/input/checkbox-styled
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/input/checkbox-styled/

Install: npx devsnips add
Tailwind/Components/Input/checkbox-styled

This is the Checkbox Styled Input — Styled checkbox components with various designs and descriptions

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://components/input/checkbox-styled