New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dynamic-dock

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamic-dock

A React component for creating a dynamic dock menu, mimicking the macOS dock style.

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

#Dynamic Dock

Introduction

Dynamic Dock is an innovative React component that transforms your images to mimic the iconic macOS dock style. By integrating this component into your web application, you can elevate the user interface with a visually appealing and intuitive dock-like experience, reminiscent of the macOS operating system. This enhancement not only improves aesthetic appeal but also enhances user interaction by providing a familiar and efficient way to navigate through images and content.

Example

https://github.com/ridemountainpig/ridemountainpig/assets/92412722/352ca5b0-7232-467c-9720-f1a071d4ed05

Installation

To get started with dynamic-dock, you need to install it into your project using npm:

npm i dynamic-dock

Usage

To use the Dynamic Dock component, you need to import it into your React application and use it as a wrapper for the images you want to display in the dock. The following example demonstrates how to use the Dynamic Dock component in a React application:

"use client";

import React from "react";
import Image from "next/image";
import DynamicDock from "dynamic-dock";

function Dock() {
    return (
        <DynamicDock gapX={10} imageWidth={100}>
            <Image
                src="https://svgl.app/library/github.svg"
                alt="Github Image"
                width={100}
                height={100}
            />
            <Image
                src="https://svgl.app/library/typescript.svg"
                alt="TypeScript Image"
                width={100}
                height={100}
            />
            <Image
                src="https://svgl.app/library/react.svg"
                alt="React Image"
                width={100}
                height={100}
            />
            <Image
                src="https://svgl.app/library/npm.svg"
                alt="NPM Image"
                width={100}
                height={100}
            />
            <Image
                src="https://svgl.app/library/vitejs.svg"
                alt="ViteJs Image"
                width={100}
                height={100}
            />
        </DynamicDock>
    );
}

export default Dock;

Props

NameDescriptionTypeUnit
gapXHorizontal spacing between imagesNumberpx
imageWidthWidth of each imageNumberpx
directionDirection of imagesrow, columnnone
justifyContentJustify content of imagescenter, start, end, space-between, space-aroundnone
alignItemsAlign items of imagescenter, start, end, stretchnone

Keywords

react

FAQs

Package last updated on 17 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts