Skip to content

Primitives and Adapters

@n3wth/ui/primitives re-exports the pinned Astryx core. The @n3wth/ui root exports adapter components with the Newth theme layered on top and a legacy prop shape. Applications must consume Astryx through @n3wth/ui/primitives, never directly.

Use native Astryx APIs with the label prop.

import { Button } from '@n3wth/ui/primitives'
export function RefreshButton() {
return <Button label="Reload page" onClick={() => window.location.reload()} />
}

Root adapters preserve existing callers, but do not reproduce every historical visual option:

  • Switch refs target a native input; Modal refs target its inner content div.
  • Input and Textarea retain native controls for labels, input types, uncontrolled values, and form reset.
  • Avatar retains native image attributes and callbacks. Button asChild retains the supplied element.
  • Tooltip arrows, dropdown portals, and menuClassName do not customize Astryx presentation. Use native primitives for new work.
  • Toast variants use the information surface except for errors. Legacy Hero gradient and entry-animation options are not applied.
  • Button
  • Badge
  • Input
  • Icon
  • NoiseOverlay
  • ScrollIndicator
  • HamburgerIcon
  • AnimatedText
  • CodeBlock
  • Skeleton and CardSkeleton
  • Shape
  • Character
  • SpeechBubble
  • Tooltip
  • Switch
  • Avatar
  • Separator
  • Progress
  • Label
  • Textarea
  • Card (with CardHeader, CardTitle, CardDescription, CardContent, CardFooter)
  • NavLink
  • CommandBox
  • ThemeToggle
  • MobileDrawer
  • ErrorBoundary (with ErrorFallback)
  • CompositeShape (with presets)
  • Modal (with ModalHeader, ModalTitle, ModalDescription, ModalBody, ModalFooter, ModalCloseButton)
  • Tabs (with TabsList, TabsTab, TabsPanel)
  • Toast (with ToastContainer)
  • Dropdown (with DropdownTrigger, DropdownMenu, DropdownItem)
  • Accordion (with AccordionItem, AccordionTrigger, AccordionContent)
  • Nav
  • Footer
  • Hero
  • Section (with SectionHeader)