Skip to content

components/BrandMark

import { … } from 'zidane-ui'ui/src/components/BrandMark.tsx

Components#

BrandMarkComponent#

Renders a service's logo on a tinted tile, or its icon or first letter when the kit has no logo for it.

TypeScript
function BrandMark(props: BrandMarkProps): Element
Parameters
NameTypeDescription
propsBrandMarkProps

Component props.

Element
BrandMark props
NameTypeDescription
brand?string

The slug of the service's logo (linear), as hasBrandMark knows it. Absent or unknown: the icon or the letter.

className?string

Extra classes on the tile.

decorative?boolean

The name is written next to the mark, so assistive tech skips it. Set false for a mark that stands alone.

icon?string

An icon class (i-ph-*) to show when there is no logo, in place of the letter.

labelstring

The service's name: the letter when there is no logo, and the image's name when the mark is not decorative.

letter?string

The letter to show when there is neither a logo nor an icon. Absent: the label's first letter.

size?BrandMarkSize

18, 28 or 40 pixels, or one em (xs).

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/components/BrandMark.tsx:75

Functions#

hasBrandMarkFunction#

Whether the kit has a logo for a Simple Icons slug.

TypeScript
function hasBrandMark(brand: string | undefined): boolean
Parameters
NameTypeDescription
brandstring | undefined

The slug, such as linear.

boolean

ui/src/components/BrandMark.tsx:21

Interfaces#

BrandMarkPropsInterface#

Props for BrandMark.

TypeScript
interface BrandMarkProps
BrandMarkProps properties
NameTypeDescription
brand?string

The slug of the service's logo (linear), as hasBrandMark knows it. Absent or unknown: the icon or the letter.

className?string

Extra classes on the tile.

decorative?boolean

The name is written next to the mark, so assistive tech skips it. Set false for a mark that stands alone.

icon?string

An icon class (i-ph-*) to show when there is no logo, in place of the letter.

labelstring

The service's name: the letter when there is no logo, and the image's name when the mark is not decorative.

letter?string

The letter to show when there is neither a logo nor an icon. Absent: the label's first letter.

size?BrandMarkSize

18, 28 or 40 pixels, or one em (xs).

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/components/BrandMark.tsx:51

Types#

BrandMarkSizeType#

The sizes of a mark: 18, 28 or 40 pixels, or xs, one em square (an icon's box, as the settings nav draws it).

TypeScript
type BrandMarkSize = 'xs' | 'sm' | 'md' | 'lg'

ui/src/components/BrandMark.tsx:14