Skip to content

Center

Puts its content in the middle, both ways: a sign-in box, a single message, an empty place.

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

On this page
  1. In the middle
  2. When to use it
  3. For everyone
  4. Props

In the middle

Sign in to see your projects.

Code
import { Button, Center, Says } from '@sypnia/ui/react';

export default function Middle() {
  return (
    <Center minHeight="14rem">
      <div className="sy-stack" style={{ '--gap': 'var(--s-3)', justifyItems: 'center' } as React.CSSProperties}>
        <Says size="sm">Sign in to see your projects.</Says>
        <Button variant="primary">Sign in</Button>
      </div>
    </Center>
  );
}

When to use it

Use it when

  • One thing alone on a screen or in a region.

Do not use it when

  • Text longer than a few lines: centred paragraphs are hard to read.

For everyone

  • Only layout.

Props

CenterTypeDefault
className string
minHeight string
  1. In the middle
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms