import { Provider, useStore } from "jotai"; import { type FC, useEffect, useState } from "react"; import { createRoot } from "react-dom/client"; import { PrebuiltLyricPlayer } from "@react-full/components/PrebuiltLyricPlayer"; import { HorizontalLayout } from "@react-full/layout/horizontal"; import { VerticalLayout } from "@react-full/layout/vertical"; import { hideLyricViewAtom } from "@react-full/states/configAtoms"; import { musicLyricLinesAtom } from "@react-full/states/dataAtoms"; const App: FC = () => { const [hideLyric, setHideLyric] = useState(false); const store = useStore(); useEffect(() => { store.set(musicLyricLinesAtom, [ { words: [ { word: "Test", startTime: 0, endTime: 1000, romanWord: "", }, ], startTime: 0, endTime: 1000, translatedLyric: "", romanLyric: "", isBG: false, isDuet: false, }, ]); }, [store]); useEffect(() => { store.set(hideLyricViewAtom, hideLyric); }, [hideLyric, store]); return ( <>

AMLL React Framework gallery

Go to Prebuilt Player

Prebuilt Player

Horizontal Layout

{hideLyric ? "Lyric is hidden" : "Lyric is shown"}
Thumb slot
} coverSlot={
Cover slot
} controlsSlot={
Controls slot
} lyricSlot={
Lyric slot
} hideLyric={hideLyric} />

Vertical Layout

Thumb slot
} coverSlot={
Cover slot
} smallControlsSlot={
Small Controls slot
} bigControlsSlot={
Big Controls slot
} lyricSlot={
Lyric slot
} hideLyric={hideLyric} /> ); }; createRoot(document.getElementById("root") as HTMLElement).render( , );