Code
An identifier in text: a prop, a class, a variable.
In a sentence
filled gives it a background, so it stands out from the words around it.
tsx
<p>
Pass <Code filled>className</Code> to override the defaults.
</p>Pass className to override the defaults.
In a table
Without a background it stays muted, which suits a column of identifiers.
tsx
<Code>ElementType</Code>
<Code>boolean</Code>
<Code>props of as</Code>ElementTypebooleanprops of asReference
| prop | type | default | |
|---|---|---|---|
as? | ElementType | "code" | the element or component to render |
filled? | boolean | false | adds a background, padding and radius |
className? | string | — | merged last, so it wins |
…rest | props of as | — | typed against the chosen element |