UNPKG

raw3d-ui

Version:

A 3D UI component library built for the Log It Raw community, starting with a mechanical keycap button.

39 lines (38 loc) 1.48 kB
import React from 'react'; /** * Props for the Button3D component. * @interface Button3DProps * @property {string | React.ReactNode} children - The content inside the button (e.g., arrow symbols or simple elements). Required. * @property {string} [className] - Additional CSS classes for customization. Optional. * @property {string} ['aria-label'] - Accessibility label for the button. Optional. * @property {'keycap' | 'drawn'} [variant] - The style variant of the button. Defaults to 'drawn'. * @property {() => void} [onClick] - Custom click handler. Optional. */ interface Button3DProps { children: string | React.ReactNode; className?: string; 'aria-label'?: string; variant?: 'keycap' | 'drawn'; onClick?: () => void; } /** * A 3D button component with a mechanical keycap design and sound effects. * @component * @param {Button3DProps} props - The properties for the Button3D component. * @returns {JSX.Element} The rendered 3D button. * @example * ```tsx * import { SoundProvider, Button3D } from 'raw3d-ui'; * * function App() { * return ( * <SoundProvider> * <Button3D variant="keycap" aria-label="Left Arrow">←</Button3D> * <Button3D variant="drawn" aria-label="Right Arrow">→</Button3D> * </SoundProvider> * ); * } * ``` */ export declare const Button3D: ({ children, className, "aria-label": ariaLabel, variant, onClick }: Button3DProps) => import("react/jsx-runtime").JSX.Element; export {};