MynaUI Icons

repository·main·Indexed 41 days ago

https://github.com/praveenjuge/mynaui-icons

A collection of open-source icons designed for HTML, React, and Avalonia. Includes the @mynaui/icons core package and @mynaui/icons-react for React projects, featuring customizable props for size, stroke, and color.

Tokens
1K
Snippets
7
Records
8
Agent score
1%

What's inside MynaUI Icons

  1. Install MynaUI Icons

    main

    You can install the core icon package or the React-specific package using your preferred package manager.

    Core Icons Package: Use @mynaui/icons for standard usage.

    React Icons Package: Use @mynaui/icons-react for React projects to access icon components.

    Alternatively, you can download the packages directly from the GitHub releases page.

    # Core package
    npm i @mynaui/icons
    # or
    bun i @mynaui/icons
    # or
    yarn add @mynaui/icons
    
    # React package
    npm i @mynaui/icons-react
    # or
    bun i @mynaui/icons-react
    # or
    yarn add @mynaui/icons-react
  2. Use MynaUI Icons in Avalonia projects

    main

    To use MynaUI icons in Avalonia, you must first merge the icon resource dictionaries into your App.axaml. You can then reference the icon data using StaticResource with the icon name (e.g., ArrowDown or ArrowDownSolid).

    <!-- App.axaml -->
    <Application.Resources>
      <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
          <MergeResourceInclude Source="/Assets/mynaui.axaml" />
          <MergeResourceInclude Source="/Assets/mynaui-solid.axaml" />
        </ResourceDictionary.MergedDictionaries>
      </ResourceDictionary>
    </Application.Resources>
    
    <!-- Your Design -->
    <PathIcon Data="{StaticResource ArrowDown}" Foreground="Green" />
    <PathIcon Data="{StaticResource ArrowDownSolid}" Foreground="Green" />
  3. Use MynaUI Icons in React projects

    main

    In React projects, import specific icon components from @mynaui/icons-react. Each icon is available as a component that accepts styling props.

    import { ArrowDown } from '@mynaui/icons-react';
    
    const App = () => {
      return <ArrowDown color="green" />;
    };
  4. React Icon Props Reference

    main

    When using @mynaui/icons-react, you can customize the icon appearance using the following props:

    | name     | type   | default      |
    | -------- | ------ | ------------ |
    | `size`   | Number | 24           |
    | `color`  | String | currentColor |
    | `stroke` | Number | 1.5          |