GitHub, 7 stars
Light themes
Dark themes

Make your own

Articles, page 2

How to build the parts of an interface in plain HTML, CSS and JavaScript, accessible from the start, worked through with the code of Tray UI.

Components, 8 minutes

A date picker in plain HTML and JavaScript

When <input type="date"> is enough, and how to build a calendar grid: arrow keys, Page Up and Down, Home and End, month buttons, the date in the name.

Components, 7 minutes

Accessible tabs in HTML: roles and arrow keys

Tabs in plain HTML and JavaScript: tablist, tab and tabpanel, aria-selected, a roving tabindex, the arrow keys, Home and End, and when tabs should be links.

Accessibility, 9 minutes

A WCAG 2.2 AA checklist for components

What to check in a component for WCAG 2.2 AA: names, keyboard, focus, target size, contrast, status messages, motion, zoom and dragging, by criterion.

CSS and themes, 7 minutes

Forced colours mode in CSS: fills become edges

How Windows High Contrast and other forced colour modes repaint a page, and the CSS that keeps cards, chosen items, icons and focus rings visible.

Screens, 7 minutes

A pricing page in HTML and CSS

A pricing page in plain HTML and CSS: plan cards, a monthly and yearly switch whose new prices are spoken, a comparison table in groups, and the questions.

Components, 6 minutes

A command palette (Cmd+K) in plain HTML

A command palette opened with Cmd+K or Ctrl+K in plain HTML: a modal dialog, a combobox over a listbox, filtering, groups and aria-activedescendant.

How Tray UI is made, 7 minutes

llms.txt and Markdown pages for AI agents

Give AI agents an llms.txt index and a Markdown copy of every page: the proposal, the full file, the .md address, the alternate link and who reads them.

CSS and themes, 6 minutes

Print styles for a web app with @media print

A print stylesheet for a web app: the light theme on paper, the navigation left out, link addresses, page breaks, tables, and the fills that must still print.

CSS and themes, 6 minutes

Ten themes from one stylesheet with data-theme

Ten colour themes in one CSS file: each a rule of custom properties on data-theme, with color-scheme, the system's dark setting, and a theme inside a theme.

Components, 8 minutes

Nested submenus that work from the keyboard

A submenu in plain HTML and JavaScript: its markup, the keys that open and close it, aria-expanded, where focus goes, and the pointer, with Tray UI's menus.

Screens, 8 minutes

Fifteen app sidebars and when to use each

App sidebars in plain HTML and CSS, and which to choose: one level or two, sections that fold, a rail of icons, a file tree, a calendar, a sidebar on each side.

CSS and themes, 7 minutes

Fluid type with clamp() that grows with zoom

Why a clamp() font size made of vw alone ignores browser zoom and text size, what a rem part changes, and how to check fluid headings against WCAG 1.4.4.

Articles 14 to 25 of 50

New articles in a feed

Add the Atom feed to a feed reader, and each new article comes to you whole, with its code.

Open the feed

GitHub7 stars

↑↓ to moveEnter to openEsc to close