React Shared Components

Interactive testing environment for react-shared components

Theme Playground

Current: Default

Icon

SVG icon component with theme support and transformation options.

Interactive Playground

Customize the Icon properties and see the changes in real-time.

Available Icons

All built-in icons available in the component.

button

digital-download

lock-solid

play

close

close-no-border

warning

arrow

chevron

avatar

media

Transformation Examples

Default

Scaled 2x

Rotated 90°

Rotated 180°

Scaled & Rotated

Small Scale

API Reference

PropTypeDefaultDescription
namestring'button'Icon identifier
scalenumber1Scale transformation
xoffsetnumber0Horizontal offset in pixels
yoffsetnumber0Vertical offset in pixels
rotatenumber0Rotation in degrees
classNamestringundefinedAdditional CSS classes
styleReact.CSSPropertiesundefinedInline styles

Usage Notes

Theme Support

The component supports theme-specific icons. Themes can override default icons by providing custom SVG files in their configuration.

Color Inheritance

Icons use currentColor by default, inheriting the text color from their parent element. This makes them easy to style with CSS.

Transformations

All transformations (scale, rotate, offset) are applied using CSS transforms, ensuring smooth rendering and performance.

Fallback Behavior

If an icon name is not found, the component returns null. The 'button' icon has a built-in fallback arrow SVG.