A React component that wrap Sakana! Widget.
npm install sakana-widget sakana-widget-react
See usage of Sanaka! Widget's README, choose a method you prefer to import CSS.
options
property of SanakaWidget component will be used as parameter of constructor of SanakaWidget class.
import { SanakaWidget } from "sakana-widget-react";
function App() {
return (
<SanakaWidget
options={{
character: "takina",
title: true,
}}
/>
);
}
import { type DetailedHTMLProps, type HTMLAttributes } from "react";
import { SakanaWidgetOptions } from "sakana-widget";
type DivElementAttributes = Omit<
DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
"key" | "ref"
>;
export interface SakanaWidgetProps extends DivElementAttributes {
/** @default false */
disableBounceOnMount?: boolean;
options: SakanaWidgetOptions;
}
Released under MIT License, please note that the 2 default images should not be used for any commercial activities. This project used to be a secondary development based on Sakana! Widget.
Image source: 大伏アオ @blue00f4 pixiv
See CONTRIBUTING.md.