{"version":"1.0","type":"rich","title":"Basic example of a Button component in ReactJs.","description":"This example demonstrates a reusable Button component built with React’s `forwardRef` API and TypeScript interfaces. It shows how the component accepts standard `ButtonHTMLAttributes` while adding a custom `primary` boolean prop to conditionally apply a `btn-primary` CSS class. The implementation spreads the remaining props onto the underlying HTML `<button>` element and forwards the `ref` for imperative access. The code highlights a pattern for extending native HTML elements with additional styling logic, using the `React.ButtonHTMLAttributes` type and `forwardRef` for proper ref handling in React components.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-d0eade062416ca48c336c44b6e3cb990?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}