About this set
A small white card centred on a light grey page: a dark monogram tile, a Sign in heading, an email field and a password field with floating labels, a black Continue button, and links to reset the password or sign up. The labels start inside the fields and move up into a small uppercase caption when the field is focused or filled. In plain CSS and Tailwind that is done with :placeholder-shown and a sibling selector, so it needs no JavaScript; the Bootstrap version uses the stock .form-floating component with the floated label restyled to match. The password field has a Show button that reveals what you typed. It is a real button with the name Show password and aria-pressed, so screen readers hear a toggle and its state; a pale background marks it when it is on. A few lines of script handle the toggle. Use this card when the sign-in page should be quiet and compact, for internal tools, dashboards or any product that does not need a marketing panel. The email and password fields carry autocomplete=”username” and “current-password” so password managers work.
What’s included
- Floating labels with no JavaScript, built on :placeholder-shown
- Show password toggle with aria-pressed and a constant accessible name
- Bootstrap version uses the native .form-floating component
- Label and border colours adjusted to meet WCAG AA contrast
- Password managers supported through autocomplete attributes
Accessibility
Every input keeps a real label element, which stays visible as a caption once the field has content. The Show password button is a type="button" toggle with aria-pressed and aria-controls. Fields show a dark border and ring on focus, and links and buttons show a 2px outline on keyboard focus. Label and focus transitions switch off under prefers-reduced-motion.
Customise it
Change --cd-ink, --cd-muted and --cd-line on .cd for colour. In Bootstrap the same variables sit on .cd beside --bs-border-color; in Tailwind edit the --color-cd-* theme colours and the peer-focus: label utilities.




















