Skip to main content

ArrowIcon Component

The ArrowIcon component is a React component that renders a customizable arrow-shaped SVG icon. It's designed for use in user interfaces where directional indicators are needed, such as navigation buttons or sliders.

Features

  • Provides a stylized arrow icon.
  • Customizable with external CSS classes.
  • Scalable and adaptable for different UI contexts.

Props

PropTypeDescription
classNamestringCSS class for additional styling of the icon.

Component

import React from "react";

const ArrowIcon = ({ className }: Props) => {
return (
<svg
className={`${className}`}
width="30px"
height="30px"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M4 12H20M20 12L16 8M20 12L16 16"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
};

export default ArrowIcon;

Usage

This component is ideal for integrating into user interface elements that require directional indicators. The className prop allows for custom styling to match the design of the application.

Example Usage

import ArrowIcon from "./path/to/ArrowIcon";

const MyComponent = () => {
return (
<div>
<button>
<ArrowIcon className="text-blue-500" />
Click Me
</button>
</div>
);
};

Styling

  • The icon uses CSS for styling, which can be customized using the className prop.
  • Adjust the width and height attributes to scale the icon as required.

Notes

  • The ArrowIcon is purely a visual component and does not inherently include interactive or accessibility features. If these features are needed, they should be implemented in the parent component where ArrowIcon is used.
  • Ensure the icon's style and color scheme are consistent with your application's design language.

This documentation provides an overview of the ArrowIcon component, detailing its features, usage, and styling options. Customize the component as needed for your specific project requirements.