--- title: "Button" slug: button category: component type: examples version: 20.0.0 tokens: 778 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-button--examples.txt --- # Button ## Default ```tsx ``` ## Status ```tsx <> ``` ## Loading ```tsx ``` ## Size ```tsx <> ``` ## Emphasis ```tsx <> ``` ## Accessibility Explicit Text Content ```tsx ``` ## Accessibility Icon Only ```tsx ``` ## Accessibility Bad Practice Icon Only ```tsx ``` ## Accessibility Labelled By ```tsx <> Filter your search results ``` ## Accessibility Bad Practice Labelled By ```tsx <> Filter your search results ``` ## Accessibility Bad Practices Role Status ```tsx { const [message, setMessage] = useState(''); const handleClick = () => { setMessage('Copied to clipboard.'); }; return ( <> { message } ); } ``` ## Accessibility Role Status ```tsx { const [message, setMessage] = useState(''); const handleClick = () => { setMessage('Copied to clipboard.'); }; return ( <> { message } ); } ``` ## Accessibility Bad Practices Role Alert ```tsx { const [error, setError] = useState(''); const handleClick = () => { setError('A critical error occurred while saving.'); }; return ( <> { error } ); } ``` ## Accessibility Role Alert ```tsx { const [error, setError] = useState(''); const handleClick = () => { setError('A critical error occurred while saving!'); }; return ( <> { error } ); } ```