About this set
Five search inputs that cover most sites: a field with the magnifier on the left, a field with an icon submit button on the right, a field with a Search button attached, a tall pill with the button inside it, and a minimal underline field for editorial pages. Use the icon-left field as the default in sidebars and lists, the icon button when space is tight, the attached button when the search is the main action of a page section, the pill for landing pages, and the underline where the design has no boxes. Each one is a form with role=”search” and a descriptive aria-label, so screen reader users can jump straight to it as a landmark. The input is type=”search”, which brings the right mobile keyboard and a native clear control, and it is named by a visually hidden label rather than by its placeholder. The icon is an inline SVG laid over the field with pointer-events turned off, so clicking it still focuses the input. The Bootstrap version uses .form-control and .input-group, and the Tailwind version uses the same measurements as utilities.
What’s included
- Five layouts: icon left, icon button, attached button, pill, underline
- form role="search" with a visually hidden label on every input
- type="search" inputs, so phones show a search keyboard
- Borders darkened to 3:1 against the page, placeholders at 4.5:1
- Focus ring drawn with box-shadow on the field itself
Accessibility
Every form has role="search" and an aria-label, and every input has a real label that is visually hidden, so the name does not disappear when someone starts typing. The icon-only submit button has aria-label="Search" and the decorative icons are aria-hidden. Focus moves the border to the accent colour and adds a ring, buttons get a 2px outline on :focus-visible, and all transitions are removed under prefers-reduced-motion.
Customise it
Change --sb-accent, --sb-line and --sb-muted on .sb for colour, and the height and border-radius on .sb-input for size. In Bootstrap the same --sb-* properties feed .form-control and the --bs-btn-* variables; in Tailwind edit the --color-sb-* theme colours and the h-, rounded- and px- utilities.






