-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTL support #22
Comments
same issue |
You can make the book RTL by starting from the last page. import HTMLFlipBook from "react-pageflip";
import { useRef } from "react";
export default function Book(params) {
const book = useRef();
return (
<>
<HTMLFlipBook startPage={5} width={300} height={300} ref={book}>
<div>Page 1</div> {/* First page in LTR, last page in RTL */}
<div>Page 2</div>
<div>Page 3</div>
<div>Page 4</div>
<div>Page 5</div> {/* Last page in LTR, first page in RTL */}
</HTMLFlipBook>
{/* Use opposite directions for page turning on custom buttons. */}
<button onClick={() => book.current.pageFlip().flipPrev()}> Next page </button>
</>
);
} If the output is not desirable, try these:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does react-pageflip support RTL ?
The text was updated successfully, but these errors were encountered: