scale
prop defines the button size. Change it by passing a number.position
prop defines the button position. Change it by passing X, Y, Z coordinates as an array of numbers.color
prop defines the button color. Change it by passing a color name or hex code as a string.hoverColor
prop defines the button color on hover. Change it by passing a color name or hex code as a string.text
prop defines the button text. Change it by passing a string.font
prop defines the font of the button text. Change it by passing a file path as a string.fontSize
prop defines the font size of the button text. Change it by passing a number.fontColor
prop defines the color of the button text. Change it by passing a color name or hex code as a string.handleClick
prop defines a callback function for the button’s onClick event. Set it by passing a function.Example
import { Canvas } from "@react-three/fiber";
import { Button } from "r3dy";
export default function App() {
return (
<Canvas>
<Button />
</Canvas>
);
}