A mobile-first design system for Hono, with Tailwind v4 tokens and JSX components for buttons, forms, cards and navigation, in light and dark. I built it for my own projects, and you can use it too.
You can see every component, with code to copy, in the docs.
- Mobile-first: every component is built for small screens first.
- Light and dark: one theme with a dark version, switched with a
data-themeattribute. - Server rendered: the components are plain Hono JSX that render to HTML, and they need no JavaScript.
- Tailwind v4 tokens: colours, type and radii are theme tokens, so you use them as classes, such as
bg-pageandtext-ink. - Typed: written in TypeScript, with the types included.
- Accessible: focus rings, labels and ARIA attributes, covered by tests.
- Tested: every component has tests.
- Free: MIT licensed.
- Hono 4
- Tailwind CSS 4
- A way to build Tailwind, such as its Vite plugin or its command line tool
pnpm add @ayonkhan/matineeHono and Tailwind are peer dependencies. If your project doesn't have them yet, add them too:
pnpm add hono tailwindcssAdd the theme to your main CSS file:
@import "tailwindcss";
@import "@ayonkhan/matinee/theme.css";
@source "../node_modules/@ayonkhan/matinee/dist";The last line tells Tailwind to look inside Matinee for class names. Without it, the components load with no styles. Change the path if your CSS file lives somewhere else.
The fonts are not bundled. Add these to the head of your page, or host the files yourself:
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700&family=Inter:wght@400;500;600&display=swap"
/>Light is the default. For dark, set data-theme="dark" on the html element. Matinee does not pick for you, so read the choice from a cookie or a setting on the server.
import { Button, Card } from '@ayonkhan/matinee'
export function Welcome() {
return (
<Card>
<p>Welcome back.</p>
<Button>Continue</Button>
</Card>
)
}| Group | Components |
|---|---|
| Actions | ActionBar, Button |
| Display | Avatar, Badge, Card, CopyBlock, Cover, Disclosure, EmptyState, List, ListItem, Notice, PageHeader, Prose, Stars, Stat |
| Forms | Checkbox, CheckboxGroup, CodeInput, Field, Fieldset, FileInput, RadioGroup, RatingInput, Select, Slider, Toggle |
| Navigation | BottomNav, Footer, Pagination, SegmentedControl, TopBar |
The theme also has tokens for colours, type and radii. The docs show each one.
The components have no styles.
- Check that the
@sourceline is in your CSS file, and that its path leads tonode_modules/@ayonkhan/matinee/distfrom where the file lives. - Check that the CSS file with the theme is the one your page loads.
The fonts look wrong. Check that the font links from step 3 are in the head of your page.
Dark mode doesn't apply. Check that data-theme="dark" is on the html element, and not on the body or a wrapper.
To work on Matinee itself, clone the repo and run pnpm install. Then you can run the tests:
pnpm testTo check the types:
pnpm typecheckTo start the docs site on your machine:
pnpm devFonts are Bricolage Grotesque and Inter, under the SIL Open Font License. Built with Hono and Tailwind CSS.
