File: newline.md | Updated: 11/16/2025
<Newline>Adds one or more newline (\n) characters.
Must be used within <Text> components.
Type: number
Default: 1
Number of newlines to insert.
import {render, Text, Newline} from 'ink';
const Example = () => (
<Text>
<Text color="green">Hello</Text>
<Newline />
<Text color="red">World</Text>
</Text>
);
render(<Example />);
Output:
Hello
World