Use Svgl’s Brand Logos as Svelte Components – Svgl Svelte

Use Svgl Svelte to add brand SVG logos as typed Svelte components. Tree-shakable and TypeScript-ready.

Svgl Svelte is an open-source library that allows you to use Svgl’s high-quality brand SVG logos as reusable Svelte components.

Features

🍃 Tree-Shakable: Only the logos you import and use will be included in your final application bundle, leading to smaller asset sizes.

🎨 Customizable: You can pass props to customize SVG attributes like size.

💪 Fully Typed Components: Provides better code quality and developer experience with TypeScript.

🔎 Optimized SVGs: Each logo is optimized for web performance.

Use Cases

  • Brand Representation: Display logos of partners, clients, or technologies on your Svelte website.
  • UI Consistency: Use standardized SVG logos in navigation bars, footers, or feature sections for a polished look.
  • Portfolio Enhancement: Showcase tools and technologies you have worked with by displaying their official logos in your Svelte-based portfolio.
  • Marketing Materials: Quickly add brand logos to digital marketing assets or presentations developed with Svelte.
  • Sponsor Sections: Neatly list sponsor logos for events or projects on your Svelte application.

Installation

npm install @selemondev/svgl-svelte
# or
yarn add @selemondev/svgl-svelte
# or
pnpm add @selemondev/svgl-svelte
# or
bun add @selemondev/svgl-svelte

Usage

1. Explore the available SVG logos on the Svgl logos page.

2. Import the logo icon as a Svelte component and then use it in your template. You can adjust attributes like height and width directly on the component.

<script lang="ts">
import { SvelteLogo } from '@selemondev/svgl-svelte';
</script>
<SvelteLogo height={200} width={200} />

3. Replace SvelteLogo with the specific logo component you wish to use from the library.

Related Resources

FAQs

Q: Can I customize the colors or styling of the logo components?
A: The logos maintain their official brand colors and styling to preserve brand integrity. You can control dimensions through width and height props, but color modifications should be avoided to respect brand guidelines.

Q: Will unused logo components affect my bundle size?
A: No, the package is tree-shakable, meaning only the logo components you actually import will be included in your final bundle.

Selemondev

Selemondev

Leave a Reply

Your email address will not be published. Required fields are marked *