Ir al contenido

CompareTable

Opciones comparadas en los mismos puntos: dos formas de correr algo, Sypnia y lo que la gente usa hoy. Las columnas son las opciones, las filas los puntos; en celulares cada punto es una tarjeta.

import { CompareTable, CompareTableSkeleton } from '@sypnia/ui/react'

En esta página
  1. Formas de correr Sypnia
  2. En Astro
  3. Skeleton
  4. Cuándo usarlo
  5. Para todos
  6. Props

Formas de correr Sypnia

Ways to run Sypnia
What you needSypnia CloudOn your serversWithout Sypnia
Ready in5 minutesAn afternoon—
UpdatesNew versions and security fixesAutomaticYou run themNo incluido
Fixes by the agentIncluidoIncluidoNo incluido
Data stays on your serversNo incluidoIncluidoIncluido
CostFrom $0Your serversHours of your team
Código
import { CompareTable } from '@sypnia/ui/react';

// Options compared on the same points; the recommended one is lit. On phones each point is a card.
export default function Options() {
  return (
    <CompareTable caption="Ways to run Sypnia" rowHeader="What you need" columns={[{ id: 'cloud', label: 'Sypnia Cloud', lit: true }, { id: 'self', label: 'On your servers' }, { id: 'none', label: 'Without Sypnia' }]} rows={[
      { id: 'setup', label: 'Ready in', values: { cloud: '5 minutes', self: 'An afternoon', none: '—' } },
      { id: 'updates', label: 'Updates', hint: 'New versions and security fixes', values: { cloud: 'Automatic', self: 'You run them', none: null } },
      { id: 'agent', label: 'Fixes by the agent', values: { cloud: true, self: true, none: false } },
      { id: 'data', label: 'Data stays on your servers', values: { cloud: false, self: true, none: true } },
      { id: 'cost', label: 'Cost', values: { cloud: 'From $0', self: 'Your servers', none: 'Hours of your team' } },
    ]} />
  );
}

En Astro

Sypnia and a log service
What happens with an errorSypniaA log service
You see it IncluidoIncluido
You know why IncluidoNo incluido
A fix is written IncluidoNo incluido
Código
---
// The Astro twin: the same table and the same phone cards, with no JavaScript.
import CompareTable from '@sypnia/ui/astro/CompareTable.astro';
---
<CompareTable caption="Sypnia and a log service" rowHeader="What happens with an error" columns={[{ id: 'us', label: 'Sypnia', lit: true }, { id: 'logs', label: 'A log service' }]} rows={[
  { id: 'see', label: 'You see it', values: { us: true, logs: true } },
  { id: 'why', label: 'You know why', values: { us: true, logs: false } },
  { id: 'fix', label: 'A fix is written', values: { us: true, logs: false } },
]} />

Skeleton

Código
import { CompareTableSkeleton } from '@sypnia/ui/react';

// The comparison while it loads.
export default function Skeleton() {
  return <CompareTableSkeleton columns={3} rows={4} />;
}

Cuándo usarlo

Úsalo cuando

  • Ayudar a alguien a elegir entre unas pocas opciones.

No lo uses cuando

  • Precios y planes: usa PricingTable.
  • Más de cuatro opciones: la tabla deja de leerse.

Para todos

  • Es una tabla con título; los chulos y las rayas se dicen en palabras.
  • En celulares cada valor lleva el nombre de su opción.

Props

CompareTableTipoPor defecto
captionobligatorio string
columnsobligatorio

The options. `lit` marks the one the page recommends.

{ id: string; label: ReactNode; lit?: boolean | undefined; }[]
rowsobligatorio CompareRow[]
rowHeader

The name of the first column: «What you need».

string
CompareTableSkeletonTipoPor defecto
columns number 3
rows number 5
  1. Formas de correr Sypnia
  2. En Astro
  3. Skeleton
  4. Cuándo usarlo
  5. Para todos
  6. Props

    Busca páginas, secciones y términos