npm install @vx/textThe @vx/text provides a better SVG component with the following features
- Word-wrapping (when width prop is defined)
- Vertical alignment (verticalAnchor prop)
- Rotation (angle prop)
- Scale-to-fit text (scaleToFit prop)
Simple demo to show off a useful feature. Since svg itself does not supportverticalAnchor, normally text rendered at 0,0 would be outside the viewport and thus not
visible. By using with the verticalAnchor="start" prop, the text will now be visible as
you'd expect.
``jsx
import React from 'react';
import { render } from 'react-dom';
import { Text } from '@vx/text';
const App = () => (
);
render(
`
```
npm install --save @vx/text