npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nautui/core

v0.1.1

Published

Core components for NautUI

Downloads

278

Readme

Core Components for Naut UI

Low-level, reusable building blocks for marketing websites built with Astro.

Installation

npm install @nautui/core
# or
pnpm add @nautui/core
# or
bun add @nautui/core

Quick Start

1. Add Theme Provider

Wrap your layout with the theme provider to enable theming:

---
import { Theme } from "@nautui/core";
---

<html lang="en">
  <body>
    <Theme>
      <slot />
    </Theme>
  </body>
</html>

2. Use Components

---
import { Button, Container, Section, Title, Text } from "@nautui/core";
---

<Section variant="dimmed">
  <Container>
    <Title level={1}>Welcome</Title>
    <Text>Get started with Astro NautUI</Text>
    <Button variant="primary">Get Started</Button>
  </Container>
</Section>

Components

Theme

  • [x] Theme — provider that injects tokens and wires up auto dark mode
  • [x] ThemeToggle — button that switches between light and dark, persists choice

Layouts

  • [x] Container — center content with padding and max-width
  • [x] Box — low-level layout component for spacing, borders, backgrounds
  • [x] Section — full-width page section with variants (dimmed, highlight, inverted)
  • [x] Group — flex container helper with gap and alignment shortcuts
  • [x] Grid — responsive 1–6 column grid with configurable gap

Elements

  • [x] Button — link or button with 11 variants (primary, secondary, outline, ghost, destructive, rainbow, …)
  • [x] Card — surface container with default, bordered, and flat variants
  • [x] Divider — horizontal rule styled with theme tokens
  • [x] Badge — small pill label for status, counts, or tags
  • [x] Image — responsive image with optional caption

Typography

  • [x] Title — semantic h1–h6 with consistent sizing
  • [x] Text — body text with size variants
  • [x] Mark<mark> styled with highlight color
  • [x] Link — themed anchor with hover and focus states
  • [x] List — styled ordered and unordered lists
  • [ ] Quote — blockquote with themed border

Navigation

  • [x] Navbar — horizontal site navigation
  • [x] Drawer — off-canvas sidebar for mobile
  • [x] Breadcrumbs — hierarchical page links

Dark Mode

Dark mode is enabled by default. Disable it with dark={false}:

<Theme dark={false}><slot /></Theme>

Use the toggle for manual switching:

<ThemeToggle />

Theming

Provide two brand colors, and the palette is derived at runtime using CSS color-mix() and OKLCH.

Required Tokens

<style>
  :root {
    --naut-color-primary: #ffb000;     /* must meet ≥ 4.5:1 vs white */
    --naut-color-secondary: #555522;   /* must meet ≥ 4.5:1 vs white */
  }
</style>

Optional Overrides

<style>
  :root {
    /* Brand colors */
    --naut-color-primary: #ffb000;
    --naut-color-secondary: #555522;
    --naut-color-destructive: #ff2222;

    /* Tint strengths */
    --naut-tint: 3%;
    --naut-tint-base: 3%;
    --naut-tint-primary: 25%;
    --naut-tint-secondary: 35%;
    --naut-tint-destructive: 10%;

    /* Typography */
    --naut-font-family: "Inter", sans-serif;
  }
</style>

All other tokens (--naut-color-base, --naut-color-text, --naut-color-surface, etc.) are derived automatically.

Browser Support

Baseline 2024: Chrome 119+, Safari 16.4+, Firefox 128+.

Icons

Recommended: Lucide Icons.

License

MIT