@neshel-ui/components
Accessible components, overlays, selection controls, navigation and an application shell.
pnpm add @neshel-ui/config @neshel-ui/components@import "@neshel-ui/config/tokens.css"; /* or tailwind.css after @import "tailwindcss" */
@import "@neshel-ui/components/styles.css";Peers: react and react-dom 19, @neshel-ui/config (types). No Tailwind, @source or provider is
required. Interactive parts use Radix (dialogs, sheets, popovers, menus, navigation menu, tooltips)
and Base UI (Select, MultiSelect, Combobox, Accordion, Collapsible, Switch) internally; you only use Neshel's API.
Catalogue
| Family | Components |
|---|---|
| Foundation | Button, Card, Badge, Input, Label, Separator, Skeleton, VisuallyHidden |
| Overlays | Dialog, AlertDialog, Sheet, Popover, Tooltip |
| Selection | Select, MultiSelect, Combobox (single and multiple) |
| Disclosure | Accordion, Collapsible — not in 0.1.0 yet |
| Forms and feedback | Switch, Toast (createToaster and Toaster) — not in 0.1.0 yet |
| Navigation | Navbar, NavigationMenu, DropdownMenu, MobileMenu |
| Application | AppShell, Sidebar (with SidebarTrigger and useAppShell) |
Not sure which one to use? See Choosing components.
Conventions
- Flat names:
DialogContent,NavbarBrand(noDialog.Content), so client references work in React Server Components. asChild: render your element (links, router links) with the component's styles and behaviour — exactly one element child; classes join, styles merge, handlers compose (child first), refs compose.- State: stateful components offer
value/defaultValue/onValueChange(oropen/defaultOpen/onOpenChange). - Portals: overlay contents accept
container; themes are copied across portals. - Responsive props: Button
size, AppShellbreakpoint, NavbarNavhideBelow, MobileMenubreakpointaccept your configured breakpoint names. - Icons: bring your own React nodes (the examples use
lucide-react). Icon-only buttons need anaria-label.
Shared types
Responsive
A value, or values per breakpoint that cascade upwards (mobile first).
type Responsive = T | { readonly [K in Breakpoint]?: T; }Breakpoint
Responsive keys: base (no media query) plus the application's breakpoint names — the defaults
sm md lg xl 2xl, or the names configured in neshel.config.ts once the declarations generated
by neshel generate are part of the program (ADR 0010).
type Breakpoint = "base" | BreakpointNameFieldSize
Styling size of form fields (uiSize; the native size attribute keeps its HTML meaning).
type FieldSize = "sm" | "md" | "lg"Errors
Invalid usage throws NeshelComponentsError during render on the server and the client, with a
message naming the component and the fix (for example <Button asChild disabled> — links cannot be
disabled).
import { NeshelComponentsError } from "@neshel-ui/components";
export function describeError(error: unknown): string {
return error instanceof NeshelComponentsError ? `Neshel usage error: ${error.message}` : String(error);
}Styling
Component rules live in the components.neshel cascade layer and read only semantic tokens. Override
with tokens (preferred), component custom properties, Tailwind utilities or your own CSS through
className. See Theming.