Lobe Icons

repository·master·Indexed 24 days ago

https://github.com/lobehub/lobe-icons

A collection of popular AI and LLM model brand SVG logos and icons for web and mobile applications. It provides a tree-shakable library via @lobehub/icons, specialized support for React Native and Expo via @lobehub/icons-rn, and static assets in SVG, PNG, and WebP formats available through npm packages or CDNs (UNPKG and Aliyun). Features include multiple icon variants (Color, Text, Avatar, and Combine) and support for light/dark mode themes.

Tokens
278.7K
Snippets
1.2K
Records
2K
Agent score
82%

What's inside Lobe Icons

  1. Key features of Lobe Icons

    master

    Lobe Icons provides a high-performance icon library with the following characteristics:

    • Lightweight & Scalable: Uses highly optimized Scalable Vector Graphics (SVG) for optimal performance and quality.
    • Tree Shakable: The collection is designed to be tree-shakable, allowing you to import only the specific icons you need to minimize your project's bundle size.
    • Active Community: Support and contributions are available via GitHub and Discord.
  2. How feature configuration synchronization works

    master

    The converter automatically synchronizes three specific feature configuration files from the Web version to the React Native version to ensure consistency:

    1. modelConfig.ts (Model icon mapping configuration)
    2. providerEnum.ts (Provider enumeration definitions)
    3. providerConfig.tsx (Provider icon mapping configuration)

    Automatic Transformation Rules

    When syncing, the following transformations are applied:

    Import Path Conversions:

    • @/IconName $\rightarrow$ ../icons/IconName
    • @/features/IconAvatar $\rightarrow$ ./IconAvatar
    • @/types $\rightarrow$ ./types

    Type Name Conversions:

    • ModelProvider $\rightarrow$ RNModelProvider
    • ModelMapping $\rightarrow$ RNModelMapping
    • ProviderMapping $\rightarrow$ RNProviderMapping
    • ModelProviderKey $\rightarrow$ RNModelProviderKey
    • IconType $\rightarrow$ RNIconProps
    • IconAvatarProps $\rightarrow$ RNIconAvatarProps
    • IconCombineProps $\rightarrow$ RNIconCombineProps

    Variable and Other Changes:

    • modelMappings $\rightarrow$ rnModelMappings
    • providerMappings $\rightarrow$ rnProviderMappings
    • Removes @lobehub/ui DivProps imports and type references.
  3. Use StreamLake icons and components

    master

    The StreamLake provider in @lobehub/icons offers several ways to render brand assets, including standard icons, text-based logos, combined assets, avatars, and color constants. Most components accept a size prop to control dimensions.

    import { StreamLake } from '@lobehub/icons';
    
    // Basic usage
    <StreamLake size={64} />
  4. Use @lobehub/icons with an AI Agent

    master

    If you are an AI agent, you can use @lobehub/icons by providing the following instruction to follow the specific skill requirements defined in the documentation.

    Read https://lobehub.com/icons/skill.md and follow the instructions to use @lobehub/icons
  5. Use AG-UI components from @lobehub/icons

    master

    The Agui component and its sub-components are part of the @lobehub/icons package. You can use Agui to render icons, text, combined elements, and avatars. Most components accept a size prop to control their dimensions.

    import { Agui } from '@lobehub/icons';
    
    export default () => <Agui size={64} />;
  6. Use ProviderIcon to render provider icons

    master

    The ProviderIcon component is used to render icons associated with specific service providers. It supports several rendering modes:

    • Default: Renders the standard provider icon.
    • Color: Renders the icon with its brand-specific colors.
    • Combine: Combines the provider icon with other visual elements.
    • Combine Color: Combines the provider icon with brand colors.
    • Avatar: Renders the provider icon in an avatar-style format.

    To use these features, you can reference the providerEnum for valid provider identifiers and providerConfig for detailed configuration settings.

  7. Use Lobe Icons via CDN

    master

    You can serve Lobe Icons directly from a CDN without installing npm packages. The icons are organized into light and dark directories to support color scheme preferences. Replace [ICON SLUG] in the URLs below with the specific icon name (e.g., openai or openai-text).

    UNPKG CDN

    Use https://unpkg.com/@lobehub/icons-static-avatar@latest/ as the base URL.

    Aliyun (npmmirror) CDN

    Use https://registry.npmmirror.com/@lobehub/icons-static-avatar/latest/files/ as the base URL.

    <!-- UNPKG Example -->
    <picture>
      <source
        media="(prefers-color-scheme: dark)"
        srcset="https://unpkg.com/@lobehub/icons-static-avatar@latest/dark/openai.png"
      />
      <img
        height="64"
        src="https://unpkg.com/@lobehub/icons-static-avatar@latest/light/openai.png"
      />
    </picture>
    
    <!-- ALIYUN Example -->
    <picture>
      <source
        media="(prefers-color-scheme: dark)"
        srcset="https://registry.npmmirror.com/@lobehub/icons-static-avatar/latest/files/dark/openai.png"
      />
      <img
        height="64"
        src="https://registry.npmmirror.com/@lobehub/icons-static-avatar/latest/files/light/openai.png"
      />
    </picture>
  8. Use Upstage icons and components

    master

    The @lobehub/icons package provides a set of components for the Upstage brand, including the main icon, text-based branding, combined assets, avatars, and brand colors. You can import the Upstage component to access these sub-components.

    import { Upstage } from '@lobehub/icons';