Skip to content
Cynosurev0.5.0
SearchStorybookGitHubnpmColour mode: System. Switch to Light

Guides

Getting started

One small, themeable, accessible UI system, used by all my projects: browser extensions, web apps and sites. Same feel and layout everywhere; each project sets its accent, its scale and any token it needs.

  • Tiny and tree-shaken: one module per component and icon, and one small runtime dependency (Detent (opens in new tab), for dragging).
  • Looks identical anywhere: pages, iframes, extension popups and shadow roots; host CSS can't break it.
  • Every property is a token: createTheme({ accent, scale, radius, font, tokens, components }).
  • Icons: 274 Facet stroke icons in 17 categories (softened-square geometry, built-in micro-animations), 98 official brand marks, and iconToSvg for pages without React.
  • One prop vocabulary: size, tone, variant, color on every component, so control is consistent.
  • Tested in real browsers: every story is a behavioural, accessibility and touch test on Chromium, Firefox and WebKit.
bash
Copy
pnpm add @arshad-shah/cynosure
tsx
Copy
import "@arshad-shah/cynosure/styles.css";
import { Button, CynosureTheme, createTheme } from "@arshad-shah/cynosure";
import { download } from "@arshad-shah/cynosure/icons";

const theme = createTheme({ accent: "#e8462e", scale: "compact" });

export const App = () => (
  <CynosureTheme theme={theme} mode="system">
    <Button variant="solid" tone="accent" icon={download}>
      Export
    </Button>
  </CynosureTheme>
);

DocsLink to "Docs"

Docs, table 1
Read thisFor
ThemingAccent, scale, radius, fonts, light and dark, per-component tokens
IconsFacet icons, brand marks and how brands allow them to be used
AccessibilityWhat every component guarantees, and how it is tested
Without ReactTokens and icons in Astro pages, static sites and plain TypeScript
Code editorsCode colours for CodeMirror, Monaco, Shiki, Prism and highlight.js
Build adaptersThe Vite adapter and shadow roots (styles.inline)

ComponentsLink to "Components"

  • Foundations: ButtonBase, LinkBase, InputBase, FileInputBase, TextAreaBase, ChoiceBase, HiddenValue, LiveRegion (hidden announcements), DialogBase, Icon (274 Facet icons and 98 brand marks); hooks useRovingFocus, useDismiss, useDrag (pointer dragging through Detent), useControllableState.
  • Controls: Button, IconButton, CopyButton, Link, TextField, NumberField, SearchField, TextArea, Select, Combobox, TagInput, Checkbox, Switch, RadioGroup, SegmentedControl, Slider, DateField, TimeField, Checklist, Pagination, ColorField, ColorSwatches, KeyValueEditor, FileDrop, PathField, SignaturePad, SelectionFrame, CompareSlider, ThemeToggle.
  • Structure: AppShell (useAppShell), TitleBar, StatusBar, Container, PageHeader, Stack, Inline, Grid, ScrollArea, Divider, AspectRatio, Breadcrumbs, SideNav, SplitPane, Card, Toolbar, Tabs, Disclosure, Accordion, Tree, SortableList, VirtualList, Calendar, DocumentViewport, PanZoomCanvas, ZoomControls.
  • Overlays: Tooltip, HoverCard, Popover, FloatingToolbar (DockedToolbar), Menu, Menubar, ContextMenu, Dialog, ProgressOverlay, Sheet, CommandPalette (useHotkey), Toast (Toaster, useToast).
  • Feedback and display: Notice, EmptyState, ErrorBoundary, ProgressBar, Steps, LoadingDots, Skeleton, DescriptionList, Stat, List, Table, Text, Heading, Prose, Avatar (AvatarGroup), IconTile, Image, CodeBlock, Announcer (useAnnounce), Badge, Kbd, Field. Theme: CynosureTheme, useColorMode, themeInitScript, createTheme.
  • Build: optional Vite adapter (@arshad-shah/cynosure/vite), React-free tokens (@arshad-shah/cynosure/tokens) and self-hosted Hanken Grotesk (fonts/hanken.css).

Status: pre-release (0.x), developed on next. Releases publish to npm from main through GitHub Actions (see Release (opens in new tab)).

Getting started
Theming
Icons
Accessibility
Code editors and highlighters
Using Cynosure without React
Build-tool adapters
Components
Accordion
AppShell
AspectRatio
Breadcrumbs
Calendar
Card
Container
Disclosure
Divider
DocumentViewport
Grid
Inline
PageHeader
PanZoomCanvas
ScrollArea
SideNav
SortableList
SplitPane
Stack
StatusBar
Tabs
TitleBar
Toolbar
Tree
VirtualList
ZoomControls
Announcer
Avatar
Badge
CodeBlock
DescriptionList
EmptyState
ErrorBoundary
Field
Heading
IconTile
Image
Kbd
List
LoadingDots
Notice
ProgressBar
Prose
Skeleton
Stat
Steps
Table
Text
Button
Checkbox
Checklist
ColorField
ColorSwatches
Combobox
CompareSlider
CopyButton
DateField
FileDrop
IconButton
KeyValueEditor
Link
NumberField
Pagination
PathField
RadioGroup
SearchField
SegmentedControl
Select
SelectionFrame
SignaturePad
Slider
Switch
TagInput
TextArea
TextField
ThemeToggle
TimeField
ButtonBase
ChoiceBase
DialogBase
FileInputBase
HiddenValue
Icon
InputBase
LinkBase
LiveRegion
TextAreaBase
ChatMessage
Choice
DataGrid
DeviceFrame
HighlightedText
HotkeyField
ListRow
OptionList
OverlayFrame
QRCode
RowActions
Section
SiteFooter
SiteHeader
SkipLink
SortButton
VisuallyHidden
CommandPalette
ContextMenu
Dialog
FloatingToolbar
HoverCard
Menu
Menubar
Popover
ProgressOverlay
Sheet
Toast
Tooltip
Changelog