BrandMark
The mark of another company, for the buttons that sign in with it: Google and GitHub, exactly as each company publishes it.
import { BrandMark } from '@sypnia/ui/react'
Sign-in buttons
Code
import { BrandMark, Button, useSypnia } from '@sypnia/ui/react';
// «Continue with» buttons: the company's own mark beside the words, which name it.
export default function SignIn() {
const es = useSypnia().locale === 'es';
return (
<div className="sy-stack" style={{ '--gap': 'var(--s-3)', maxWidth: '22rem' } as React.CSSProperties}>
<Button variant="secondary" block><BrandMark name="google" />{es ? 'Continuar con Google' : 'Continue with Google'}</Button>
<Button variant="secondary" block><BrandMark name="github" />{es ? 'Continuar con GitHub' : 'Continue with GitHub'}</Button>
</div>
);
} In Astro
Code
---
// The same buttons in Astro, without JavaScript: links to the sign-in of each provider.
import Button from '@sypnia/ui/astro/Button.astro';
import BrandMark from '@sypnia/ui/astro/BrandMark.astro';
---
<div class="sy-stack" style="--gap:var(--s-3);max-width:22rem">
<Button variant="secondary" block href="#google"><BrandMark name="google" />Continue with Google</Button>
<Button variant="secondary" block href="#github"><BrandMark name="github" />Continue with GitHub</Button>
</div> When to use it
Use it when
- «Continue with Google» and «Continue with GitHub», beside the words that name the company.
- The list of sign-in methods in a console's settings.
Do not use it when
- Anywhere else: Sypnia screens use the Sypnia icon set.
- Changing its colours or shape: Google's «G» keeps its four colours, the GitHub mark is one colour (the text's).
For everyone
- Beside words it is decoration, hidden from screen readers: the button's words name the company.
- Alone, with
label, it is an image named after the company.
Props
| BrandMark | Type | Default |
|---|---|---|
namerequired | "google" | "github" | |
className | string | |
labelNames it for screen readers («Google»). Without it the mark is decoration beside the button's words. | boolean | |
sizePixels. Without it the mark follows the text size (1.25em). | number |