# timeless
> CSS components for plain HTML, ported from [Untitled UI](https://www.untitledui.com/react). You write regular elements with an `is` attribute; behavior comes from the browser (``, `popover`, ``, checkboxes, radios), so there is no JavaScript to ship and no framework to install.
## Install
timeless is private: it isn't published to npmjs.org. Install it from GitHub:
```sh
npm install github:matthewmueller/timeless
```
Then import it from your own CSS (Vite, PostCSS, Tailwind, etc.):
```css
@import "timeless.css";
```
Or link the hosted build:
```html
```
### With Tailwind CSS
timeless doesn't need Tailwind, but it's designed to sit alongside it. Import it after Tailwind:
```css
@import "tailwindcss";
@import "timeless.css";
```
timeless uses Tailwind's variable names (`--spacing`, `--text-sm`, `--radius-lg`, `--color-gray-300`, ...), so Tailwind's utilities pick up timeless's [open-color](https://yeun.github.io/open-color/) palette, type scale, radii and shadows, and `bg-gray-100` matches the components. Colors Tailwind doesn't have, like `brand` or `error`, work as `bg-(--color-brand-600)`, or register them in your own `@theme`.
## Example
```html
Save
Delete
```
Every component is in the [Storybook](https://timeless.mat.tm) in light and dark mode. **Show code** under each story is the exact HTML to copy. **Examples** has copyable application pages (settings, dashboard, team, billing…), marketing sections (features, pricing, FAQ…) and smaller patterns, each with its CSS. **Foundations** covers the design tokens, layout techniques (stack, cluster, grid, sidebar) and the icon library.
For coding agents, point them at [timeless.mat.tm/llms.txt](https://timeless.mat.tm/llms.txt): this Readme plus a Markdown page per component with the HTML of every example, generated from the same stories ([llms-full.txt](https://timeless.mat.tm/llms-full.txt) has it all in one file).
## Usage
**The `is` attribute.** The first word names the component; the rest are variants and sizes, in any order: `is="Badge success dot sm"`. Parts of a component use `Name-part`, like `Field-label` or `Tabs-panel`.
**Sizes.** `xs`, `sm`, `lg`, `xl` (medium is the default). Sizes on a container apply to the controls inside it, so `is="InputGroup sm"` makes its buttons and inputs small.
**Colors.** `brand`, `error`, `warning`, `success`, and gray by default. Badges also take any open-color name: `red`, `pink`, `grape`, `violet`, `indigo`, `blue`, `cyan`, `teal`, `green`, `lime`, `yellow`, `orange`.
**Icons.** Any inline `` that draws with `currentColor`; components set its size and color. The Foundations → Icons page in the Storybook has all 1,171 [Untitled UI icons](https://www.untitledui.com/icons): click one to copy its SVG.
**State comes from HTML.** Use the attributes you'd write anyway:
| State | Write |
| -------- | ----------------------------------------------------------- |
| Disabled | `disabled`, or `aria-disabled="true"` on links |
| Required | `required` (Field adds the `*`) |
| Invalid | `aria-invalid="true"`, or just native validation |
| Selected | `:checked`, `aria-selected`, `aria-current`, `aria-pressed` |
| Sorted | `aria-sort` on table headers |
| Progress | `aria-current="step"`; earlier steps show as complete |
**Behavior without JavaScript.**
```html
Invite
…
Options
Details
Profile
Design
…
```
**Dark mode.** Add `class="dark-mode"` to any ancestor, usually ``.
**Theming.** Every value is a CSS custom property in [theme.css](https://timeless.mat.tm/theme.css). Override them in your own CSS; for example, `--color-brand-600: var(--color-violet-600)` (and the other `--color-brand-*` shades) re-brands every component.
## For agents
- Each page below shows a component's usage, then the exact HTML of every Storybook example. Copy that HTML; use only the variant words it shows.
- Write plain HTML with `is="…"`. Don't add classes, inline styles or JavaScript to restyle or wire up components: dialogs, menus, tabs, accordions and toasts work with the attributes shown.
- `… ` in the examples stands for any inline icon that draws with `currentColor`.
- [llms-full.txt](https://timeless.mat.tm/llms-full.txt) has every page in one file. [theme.css](https://timeless.mat.tm/theme.css) has every design token.
### Foundations
- [Design tokens](https://timeless.mat.tm/theme.css): every color, size, radius, shadow and font as a CSS variable
- [Icons](https://timeless.mat.tm/llms/foundations/icons.txt)
- [Layout](https://timeless.mat.tm/llms/foundations/layout.txt)
### Components
- [Alert](https://timeless.mat.tm/llms/components/alert.txt)
- [Avatar](https://timeless.mat.tm/llms/components/avatar.txt)
- [AvatarGroup](https://timeless.mat.tm/llms/components/avatargroup.txt)
- [Badge](https://timeless.mat.tm/llms/components/badge.txt)
- [Breadcrumbs](https://timeless.mat.tm/llms/components/breadcrumbs.txt)
- [Button](https://timeless.mat.tm/llms/components/button.txt)
- [Checkbox](https://timeless.mat.tm/llms/components/checkbox.txt)
- [Code](https://timeless.mat.tm/llms/components/code.txt)
- [Command](https://timeless.mat.tm/llms/components/command.txt)
- [Divider](https://timeless.mat.tm/llms/components/divider.txt)
- [Drawer](https://timeless.mat.tm/llms/components/drawer.txt)
- [Dropzone](https://timeless.mat.tm/llms/components/dropzone.txt)
- [Empty](https://timeless.mat.tm/llms/components/empty.txt)
- [Feed](https://timeless.mat.tm/llms/components/feed.txt)
- [Field](https://timeless.mat.tm/llms/components/field.txt)
- [File](https://timeless.mat.tm/llms/components/file.txt)
- [Icon](https://timeless.mat.tm/llms/components/icon.txt)
- [Input](https://timeless.mat.tm/llms/components/input.txt)
- [InputGroup](https://timeless.mat.tm/llms/components/inputgroup.txt)
- [Link](https://timeless.mat.tm/llms/components/link.txt)
- [Loader](https://timeless.mat.tm/llms/components/loader.txt)
- [Menu](https://timeless.mat.tm/llms/components/menu.txt)
- [Metric](https://timeless.mat.tm/llms/components/metric.txt)
- [Modal](https://timeless.mat.tm/llms/components/modal.txt)
- [Nav](https://timeless.mat.tm/llms/components/nav.txt)
- [Pagination](https://timeless.mat.tm/llms/components/pagination.txt)
- [Pin](https://timeless.mat.tm/llms/components/pin.txt)
- [Progress](https://timeless.mat.tm/llms/components/progress.txt)
- [Radio](https://timeless.mat.tm/llms/components/radio.txt)
- [Rating](https://timeless.mat.tm/llms/components/rating.txt)
- [Section](https://timeless.mat.tm/llms/components/section.txt)
- [Select](https://timeless.mat.tm/llms/components/select.txt)
- [Slider](https://timeless.mat.tm/llms/components/slider.txt)
- [Steps](https://timeless.mat.tm/llms/components/steps.txt)
- [Swatch](https://timeless.mat.tm/llms/components/swatch.txt)
- [Table](https://timeless.mat.tm/llms/components/table.txt)
- [Tabs](https://timeless.mat.tm/llms/components/tabs.txt)
- [Tag](https://timeless.mat.tm/llms/components/tag.txt)
- [Toast](https://timeless.mat.tm/llms/components/toast.txt)
- [Toggle](https://timeless.mat.tm/llms/components/toggle.txt)
- [Tooltip](https://timeless.mat.tm/llms/components/tooltip.txt)
- [Tree](https://timeless.mat.tm/llms/components/tree.txt)
- [Upload](https://timeless.mat.tm/llms/components/upload.txt)
### Examples
- [Application](https://timeless.mat.tm/llms/examples/application.txt)
- [Marketing](https://timeless.mat.tm/llms/examples/marketing.txt)
- [Patterns](https://timeless.mat.tm/llms/examples/patterns.txt)