Docs
Showcase
Showcase
The Showcase component is an engaging and interactive way to present and highlight your application. Equipped with immersive 3D effects, smooth animations, and customizable layers, it brings your content to life.
Loading...
Installation
Install dependencies
npm install
Add util file
lib/utils.ts
Copy the showcase-example file (optional)
The showcase-example file contains the body and header of the showcase. It's the example used to build this component. It's optional but can be helpful as a starting point to build your own.
showcase-example.tsx
Copy the source code
showcase.tsx
Props
Showcase props
Prop | Type | Description | Default |
---|---|---|---|
children | React.ReactNode | Elements displayed inside the showcase. | - |
damping | number | Controls the spring animation damping of the rotation effect. | 20 |
swiftness | number | Controls the spring animation stiffness of the rotation effect. | 80 |
maxRotation | number | Maximum rotation angle applied to the showcase on mouse movement. | 25 |
ShowcaseSpotlight props
Prop | Type | Description | Default |
---|---|---|---|
children | React.ReactNode | Elements to be highlighted with the spotlight effect. | - |
className | string | Additional classes for custom styling of the spotlight. | - |
ShowcaseHeader props
Prop | Type | Description | Default |
---|---|---|---|
children | React.ReactNode | Content to be displayed in the header section of the showcase. | - |
ShowcaseBody props
Prop | Type | Description | Default |
---|---|---|---|
children | React.ReactNode | Main content to be displayed in the body of the showcase. | - |
isMedium | boolean | Determines if the screen size is medium or larger, adjusting layout accordingly. | - |