Introduction
React components for dense, quiet product interfaces, each one taken from a project that needed it. ui-sdk handles behavior and accessibility, and StyleX handles the styles.
Where the components come from
Every component here was written for one of our own projects first, because that app needed it. Once it had held up there, it moved into NyctoUI and took on the shared tokens and the same states as the rest. New components arrive the same way.
That’s why the list has an on-screen keyboard, an iPhone frame drawn to scale and a masked API key, and why it has no carousel. The examples lean the same way. They show a calendar that blocks booked nights, a heatmap of deploys by hour and a table of ten thousand log lines, not lorem ipsum.
Principles
- Dense and neutral. Control text is 14px, surfaces are flat, and color is kept for status. Nothing on the page should shout.
- Built on ui-sdk. Focus, keyboard and ARIA come from a ui-sdk component wherever one exists. Most components accept the props of the part they wrap.
- Composed from parts. A menu is a
Dropdownwith a trigger, content and items, not one component with anitemsarray. - One height scale. Buttons, inputs and select triggers are 24, 32 or 40px, so a row of controls lines up.
Styling with sx
Components take no className or style. Overrides are StyleX styles passed to sx, merged after the built-in ones, so they win without a specificity fight.
import * as stylex from '@stylexjs/stylex'
<Button sx={styles.wide}>Continue</Button>
const styles = stylex.create({
wide: { width: '100%' },
})Changing the element
Parts that render an element take ui-sdk’s render prop to become another element or component, keeping their styles and behavior. There is no asChild.
<SidebarItemButton render={<Link to="/inbox" />}>…</SidebarItemButton>
<DropdownTrigger render={<Button variant="ghost" />}>…</DropdownTrigger>Theming
Every color token is a light-dark() value, so the theme follows color-scheme. Set it on <html> to switch the whole page, or on any element to switch just that part. The theme menu at the top of the sidebar works this way.
document.documentElement.style.colorScheme = 'dark'Dependencies
Every component needs the first four. The rest are pulled in only by the components that use them.
- ui-sdk.
@ui-sdk/reactand@ui-sdk/coregive focus, keyboard and ARIA behavior. Its stylesheet is not imported. - StyleX.
@stylexjs/stylexdraws every style, from tokens compiled at build time. - Tabler Icons.
@tabler/icons-reactfor the components’ own glyphs, such as chevrons, checks and the spinner. - Geist.
@fontsource-variable/geistand@fontsource-variable/geist-mono, the variable fonts for text and code. - TanStack Table.
@tanstack/react-tablefor sorting, selection and pinning in Table. - TanStack Virtual.
@tanstack/react-virtualrenders only the visible rows in Table, Command and the Emoji Picker. - dnd-kit.
@dnd-kit/corehandles the pointer when rows are dragged in a Tree. - Emojibase.
emojibase-datais the source for the Emoji Picker’s data, trimmed at build time bypnpm emoji-data.