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.
Choose your import
Section titled “Choose your import”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()} />}Use compatibility adapters with children and historical props like variant="glass", leftIcon, and responsive size objects.
import { Button, Icon } from '@n3wth/ui'
export function GlassButton() { return ( <Button variant="glass" size="md" leftIcon={<Icon name="arrow-right" />}> Continue </Button> )}Component catalog
Section titled “Component catalog”Compatibility boundaries
Section titled “Compatibility boundaries”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
asChildretains the supplied element. - Tooltip arrows, dropdown portals, and
menuClassNamedo 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.
ButtonBadgeInputIconNoiseOverlayScrollIndicatorHamburgerIconAnimatedTextCodeBlockSkeletonandCardSkeletonShapeCharacterSpeechBubbleTooltipSwitchAvatarSeparatorProgressLabelTextarea
Molecules
Section titled “Molecules”Card(withCardHeader,CardTitle,CardDescription,CardContent,CardFooter)NavLinkCommandBoxThemeToggleMobileDrawerErrorBoundary(withErrorFallback)CompositeShape(withpresets)Modal(withModalHeader,ModalTitle,ModalDescription,ModalBody,ModalFooter,ModalCloseButton)Tabs(withTabsList,TabsTab,TabsPanel)Toast(withToastContainer)Dropdown(withDropdownTrigger,DropdownMenu,DropdownItem)Accordion(withAccordionItem,AccordionTrigger,AccordionContent)
Organisms
Section titled “Organisms”NavFooterHeroSection(withSectionHeader)
Related
Section titled “Related”Theme ProviderMount N3wthProvider and load the Newth theme CSS.
LayoutsBuild page frames with the site composition components.