Nibbling Perfect Macaroni

    @rodneylab/svelte-social-icons
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.21 • Public • Published

    Rodney Lab svelte-social-icons Github banner

    Rodney Lab logo

    Svelte Social Icons

    svelte-social-icons

    Open in Visual Studio Code

    Social icons for Svelte. Based on react-social-icons by Jake Trent.

    To install:

    pnpm install @rodneylab/svelte-social-icons
    

    Alternatively, replace pnpm with npm or run yarn add @rodneylab/svelte-social-icons.

    To use:

    <script>
      import SocialIcons from '@rodneylab/svelte-social-icons';
    </script>
    
    <SocialIcons network="github" alt=""/>
    <SocialIcons network="twitter" alt=""/>
    

    Svelte Social Icons - icons shown for 47 popular social networks in native colours

    • Change icon size:
    <SocialIcons alt="" network="github" width="24" height="24" />

    Svelte Social Icons - icons shown for 47 popular social networks in native colours, icons are smaller than previous image

    • Change foreground and background colours:
    <SocialIcons alt="" network="github" fgColor="#eeeeee" bgColor="#111111" />

    Svelte Social Icons - icons shown for 47 popular social networks with themed dark background and light foreground colours

    Svelte Social Icons - icons shown for 47 popular social networks with themed light background and dark foreground colours

    Svelte Social Icons - icons shown for 47 popular social networks in rainbow colours each icon has background set to one of the six rainbow colours and colours alternate in sequence

    Props

    Property Type Required Description
    network Network Yes Override which network icon to render. You can import the type if you need it in TypeScript: import type { Network } from '@rodneylab/svelte-social-icons';
    bgColor String No Override the background fill colour (defaults to social network's color).
    fgColor String No Override the icon's fill colour (defaults to transparent).
    style Object No Override style properties passed to the rendered anchor tag.

    Install

    npm i @rodneylab/svelte-social-icons

    DownloadsWeekly Downloads

    56

    Version

    0.0.21

    License

    BSD-3-Clause

    Unpacked Size

    250 kB

    Total Files

    14

    Last publish

    Collaborators

    • rodneylab