Book

A 3D book component featuring customizable sizes and color gradients.

API

Book

The Book component serves as a wrapper for creating an interactive 3D book effect.

Props

Prop NameTypeDefaultDescription
classString-Additional classes for styling the component.
durationNumber1000Animation duration in milliseconds.
colorString"zinc"Color theme for the book gradient.
isStaticBooleanfalseDisables hover animations when true.
sizeString"md"Size variant of the book.
radiusString"md"Border radius variant of the book.
shadowSizeString"lg"Shadow size variant of the book.

Usage

MyBookComponent.vue
<Book class="additional-class">
  <!-- Your content here -->
</Book>

BookHeader

The BookHeader component is a flexible container with preserved 3D styling. It is intended to be used within a Book to hold content with a 3D transformation effect.

Props

Prop NameTypeDefaultDescription
classString-Additional classes for custom styling.

Usage

MyBookComponent.vue
<BookHeader class="additional-class">
  <!-- Your content here -->
</BookHeader>

BookTitle

The BookTitle component is a flexible container with preserved 3D styling. It is intended to be used within a Book to hold content with a 3D transformation effect.

Props

Prop NameTypeDefaultDescription
classString-Additional classes for custom styling.

Usage

MyBookComponent.vue
<BookTitle class="additional-class">
  <!-- Your text here -->
</BookTitle>

BookDescription

The BookDescription component is a flexible container with preserved 3D styling. It is intended to be used within a Book to hold content with a 3D transformation effect.

Props

Prop NameTypeDefaultDescription
classString-Additional classes for custom styling.

Usage

MyBookComponent.vue
<BookDescription class="additional-class">
  <!-- Your text here -->
</BookDescription>

Component Code

You can copy and paste the following code to create these components:

Book.vue
BookHeader.vue
BookTitle.vue
BookDescription.vue
index.ts

Credits

  • Credits to x/UI for inspiring this component.
  • Credits to kalix127 for porting this component.