Life is like an npm install β you never know what you are going to get.); } ``` ## Text wrap Use the `textWrap` prop to control the `text-wrap` CSS property: ```tsx import { Blockquote } from '@mantine/core'; import { InfoIcon } from '@phosphor-icons/react'; function Demo() { const icon =
Life is like a box of chocolates. You never know what you are gonna get. But whatever you get, you should make the most of it and enjoy every moment.); } ``` #### Props **Blockquote props** | Prop | Type | Default | Description | |------|------|---------|-------------| | cite | React.ReactNode | - | Reference to a cited quote | | color | MantineColor | - | Key of `theme.colors` or any valid CSS color | | icon | React.ReactNode | - | Blockquote icon, displayed at the top left side | | iconSize | string \| number | - | Controls icon `width` and `height`, numbers are converted to rem | | radius | MantineRadius \| number | - | Key of `theme.radius` or any valid CSS value to set `border-radius` | | textWrap | "wrap" \| "nowrap" \| "balance" \| "pretty" \| "stable" | - | Controls `text-wrap` CSS property | #### Styles API Blockquote component supports Styles API. With Styles API, you can customize styles of any inner element. Follow the documentation to learn how to use CSS modules, CSS variables and inline styles to get full control over component styles. **Blockquote selectors** | Selector | Static selector | Description | |----------|----------------|-------------| | root | .mantine-Blockquote-root | Root element | | icon | .mantine-Blockquote-icon | Icon element | | cite | .mantine-Blockquote-cite | Cite element | **Blockquote CSS variables** | Selector | Variable | Description | |----------|----------|-------------| | root | --bq-bd | Controls `border` | | root | --bq-bg-dark | Controls `background-color` in dark color scheme | | root | --bq-bg-light | Controls `background-color` in light color scheme | | root | --bq-icon-size | Controls `width` and `height` of the icon | | root | --bq-radius | Controls `border-radius` | | root | --bq-text-wrap | Controls `text-wrap` property | -------------------------------------------------------------------------------- ### Box Package: @mantine/core Import: import { Box } from '@mantine/core'; Description: Base component for all Mantine components ## Usage `Box` component is used as a base for all other components. `Box` supports the following features: * [component prop](https://mantine.dev/llms/guides-polymorphic.md) * [style props](https://mantine.dev/llms/styles-style-props.md) * [style prop](https://mantine.dev/llms/styles-style.md) You can use `Box` as a base for your own components or as a replacement for HTML elements: ```tsx import { Box } from '@mantine/core'; function Demo() { return (
React.createElement();
}
```
## Block code
To render code in a `pre` element, pass the `block` prop to the Code component:
```tsx
import { Code } from '@mantine/core';
const codeForPreviousDemo = `import { Code } from '@mantine/core';
function Demo() {
return React.createElement();
}`;
function Demo() {
return {codeForPreviousDemo};
}
```
## Custom color
By default, the code color is gray. You can change it to any valid CSS color or to one
of the [theme.colors](https://mantine.dev/llms/theming-colors.md):
```tsx
import { Code, Group } from '@mantine/core';
function Demo() {
return (
React.createElement()
React.createElement()
Drawer with scroll
); return ( <>Drawer with scroll
); return ( <>-
{files.map((file, index) => (
- {file.name} ))}
Modal with scroll
); return ( <>Modal with scroll
); return ( <>
{visible &&
{visible && (
First
Second
Third
{`{ x: ${scrollPosition.x}, y: ${scrollPosition.y} }`}
{lorem}
); return ( <>