Logo: React
A wrapper component around the CDN-hosted logos for each brand.
Installation
Before you can start using the @chameleon/react component, you’ll need to install it, for more information check: Getting started for developers.
With that done, you’re now ready to implement the component in your application.
import { Logo } from '@chameleon/react';
export default function Example() {
return <Logo />;
}
Properties
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
alt | String | - | No | Sets the native image alt attribute. |
className | String | - | No | Allows extending the class names of the Logo component. |
extension | CdnExtension | 'svg' | No | The file extension of the logo. |
name | String | 'logo-main' | No | Controls which logo is displayed. |
name
The name property controls which logo is displayed. Defaults to 'logo-main'. You can access logo variations using their names (e.g., 'logo-square-main', 'logo-plus-main').
extension
The extension property controls the file format of the loaded asset. Defaults to 'svg'. You can also use 'png'.
alt
The alt property sets the image alt text for accessibility. Since logos render as <img> elements, provide a meaningful alt description or an empty string for decorative images.