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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@braid-design-system/docs-ui

v2.1.0

Published

<img src="https://raw.githubusercontent.com/seek-oss/braid-design-system/HEAD/packages/docs-ui/images/braid-docs-ui-logo.svg#gh-light-mode-only" alt="Braid Docs UI" title="Braid Docs UI" width="80px"> <img src="https://raw.githubusercontent.com/seek-oss/b

Downloads

876

Readme

docs-ui

Components for building documentation sites with a consistent user experience to the Braid Design System website.

npm install @braid-design-system/docs-ui

Usage

LinkableHeading

A heading wrapped in a link to a hash that is generated based on the heading content, enabling deep links within documentation pages.

Example

import { LinkableHeading } from '@braid-design-system/docs-ui';

<LinkableHeading>Section heading</LinkableHeading>;

Props

| props | value | description | | --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | level | HeadingLevel | The heading size (defaults to 3) | | component | string | HTML element to render, e.g. “h1”, “h2”, etc. | | children | string | Visible heading content, converted to slug (e.g. “section-heading”) to be used as hash link. | | label | string | Override the slug used as the hash link.Note: If the content of the heading is more than a simple string that can be slugified, then the label is required. |

MenuButton

A hamburger button used for showing and hiding the Navigation Sidebar on mobile devices.

Example

import { MenuButton } from '@braid-design-system/docs-ui';

<MenuButton open={menuOpen} onClick={handleOnClick} />;

Props

| props | value | description | | ------- | ------------ | ------------------------------------------------------------------------------------------------------------- | | open | boolean | The Menu can either be open or closed. If open, the button will change to a close icon (defaults to false). | | onClick | () => void | A callback function to manage events when the button is triggered. |

SideNavigationSection

A navigation section containing a list of links, designed for the side bar.

import { SideNavigationSection } from '@braid-design-system/docs-ui';

<SideNavigationSection title={title} items={items} />;

Props

| props | value | description | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | | title | string | Title of the Navigation Section. | | hideTitle | boolean | Optional to visually hide the group title. | | items | Array<{  name: string  path: string  badge?: 'New' \| 'Deprecated'  onClick?: () => void  target?: string  active?: boolean}> | An array of items in the sidebar, each linking to a specific docs page. |

HeaderNavigation

Layout for the site logo, a MenuButton on smaller screens, and an optional theme selector.

import { HeaderNavigation } from '@braid-design-system/docs-ui';

<HeaderNavigation
  menuOpen={menuOpen}
  menuClick={handleMenuClick}
  logo={<Logo />}
  logoLabel={logoLabel}
  themeToggle={<ThemeToggle />}
/>;

Props

| props | value | description | | ----------- | ----------------- | ------------------------------------------------------------------------------------------------------------- | | menuOpen | boolean | The Menu can either be open or closed. If open, the button will change to a close icon (defaults to false). | | menuClick | () => void | An optional callback function to handle events when the menu button is clicked. | | logo | React.ReactNode | A React component for the logo of your site (which should act as a link to your homepage). | | logoLabel | string | An accessibility label for the logo. | | logoHref | string | An optional href which sets the link for when the logo is clicked. | | themeToggle | React.ReactNode | An optional React component for a theme selector. |