Code
The <Code>
component is a styled wrapper around the <code>
HTML element.
You can use this component to display a short piece of code within the text.
The useId
hook can be used to generate unique IDs for labeling form elements.
import * as React from 'react';
import { Code } from '@itwin/itwinui-react';
export default () => {
return (
<p>
The <Code>useId</Code> hook can be used to generate unique IDs for
labeling form elements.
</p>
);
};
Props
Prop | Description | Default |
---|---|---|
as | "symbol" | "object" | "code" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | ... 159 more ... | FunctionComponent<...> |