Skip to content

Add support for print length formatting #268

@xn1cklas

Description

@xn1cklas

Problem Statement

Sometimes content on a single line can be exceedingly long, while UIs rendering chat streams have limited size. Especially when streaming code this can cause inconsistent loading animations during token streams.

Proposed Solution

Add a print length similar to biome / prettier that adds line breaks to content during streaming

Alternatives Considered

No response

Use Case

import { Streamdown } from "streamdown";

export default function Page(markdown: string) {

  return <Streamdown maxContentLength={200px}>{markdown}</Streamdown>;
}

Priority

None

Contribution

  • I am willing to help implement this feature

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions