Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@braid-design-system/docs-ui

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@braid-design-system/docs-ui

<img src="https://raw.githubusercontent.com/seek-oss/b

  • 3.0.0-master-20241014041320
  • master
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-10.53%
Maintainers
0
Weekly downloads
 
Created
Source
Braid Docs UI Braid Docs UI

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
propsvaluedescription
levelHeadingLevelThe heading size (defaults to 3)
componentstringHTML element to render, e.g. “h1”, “h2”, etc.
childrenstringVisible heading content, converted to slug (e.g. “section-heading”) to be used as hash link.
labelstringOverride 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
propsvaluedescription
openbooleanThe Menu can either be open or closed. If open, the button will change to a close icon (defaults to false).
onClick() => voidA 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
propsvaluedescription
titlestringTitle of the Navigation Section.
hideTitlebooleanOptional to visually hide the group title.
itemsArray<{
  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
propsvaluedescription
menuOpenbooleanThe Menu can either be open or closed. If open, the button will change to a close icon (defaults to false).
menuClick() => voidAn optional callback function to handle events when the menu button is clicked.
logoReact.ReactNodeA React component for the logo of your site (which should act as a link to your homepage).
logoLabelstringAn accessibility label for the logo.
logoHrefstringAn optional href which sets the link for when the logo is clicked.
themeToggleReact.ReactNodeAn optional React component for a theme selector.

FAQs

Package last updated on 14 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc