Skip to content

ProductSwitch

The products of the suite in a grid, from the top bar: Data, Run, Files, Mail… The current one is marked.

import { ProductSwitch } from '@sypnia/ui/react'

On this page
  1. The Sypnia suite
  2. When to use it
  3. For everyone
  4. Props

The Sypnia suite

Code
import { ProductSwitch } from '@sypnia/ui/react';

// The products of the suite, from the top bar. The current one is marked.
export default function Suite() {
  return <ProductSwitch current="data" products={[
    { id: 'data', name: 'Data', href: '#data', icon: 'p-data', detail: 'Database' },
    { id: 'run', name: 'Run', href: '#run', icon: 'p-run', detail: 'Functions' },
    { id: 'files', name: 'Files', href: '#files', icon: 'p-files', detail: 'Storage' },
    { id: 'mail', name: 'Mail', href: '#mail', icon: 'p-mail', detail: 'Email' },
    { id: 'telemetry', name: 'Telemetry', href: '#telemetry', icon: 'p-telemetry', detail: 'Errors and speed' },
    { id: 'cases', name: 'Cases', href: '#cases', icon: 'p-cases', detail: 'Use cases' },
  ]} />;
}

When to use it

Use it when

  • Apps of a suite, so people move between products without going home.

Do not use it when

  • Apps with a single product.

For everyone

  • It opens a dialog named «Products»; the current product is aria-current.

Props

ProductSwitchTypeDefault
productsrequired ProductLink[]
current string
  1. The Sypnia suite
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms