Prose

Styles a block of rich text, such as an article from a CMS, with readable spacing for its headings, lists, and links.

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 4 with code

Good notes are short and easy to find again. Write each note as if someone else will read it, because you will have forgotten the details by the time you open it again. Start with one line that says what the note is about, then add the details underneath. Keep one idea in each note, and link two notes together when one idea builds on the other. To reuse a line somewhere else, select it first. Press Ctrl + C to copy

Go through your notes once a week. Delete the ones you no longer need, and merge the ones that say the same thing. A small set of notes you trust is more useful than a large pile you never open.


Tags help when a note fits in more than one place. Use a few broad tags, such as work, home and reading, so you do not have to remember dozens of names later.

Usage

Code
import { Prose } from '@leverui/components';
Code
<Prose>
  <div innerHTML="..." />
</Prose>

Examples

Sizes

Use the size prop to change the size of the Prose component

size: md

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 4 with code

Good notes are short and easy to find again. Write each note as if someone else will read it, because you will have forgotten the details by the time you open it again. Start with one line that says what the note is about, then add the details underneath. Keep one idea in each note, and link two notes together when one idea builds on the other. To reuse a line somewhere else, select it first. Press Ctrl +C to copy

size: lg

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 4 with code

Good notes are short and easy to find again. Write each note as if someone else will read it, because you will have forgotten the details by the time you open it again. Start with one line that says what the note is about, then add the details underneath. Keep one idea in each note, and link two notes together when one idea builds on the other. To reuse a line somewhere else, select it first. Press Ctrl +C to copy

Blockquote

Blockquote elements are styled to match the design language of the Blockquote component.

Blockquotes

A short quote fits on one line.

A quote can also run over several lines:

Write each note as if someone else will read it. Start with one line that says what the note is about, then add the details underneath. If a note grows longer than one screen, split it into two.

Prose also styles strong, b and em text, and code blocks too.

List

List elements are styled to match the design language of the List component.

Lists

Here is an unordered list. Things to buy:

  • Milk
  • Eggs
  • Bread
  • Coffee

And here is an ordered list. Things to do:

  1. Pay the bills
  2. Walk the dog
  3. Take out the trash

Solid Markdown

Here's an example of rendering Markdown content with the micromark library.

Heading

This text comes from a Markdown string. Read the docs to learn more.

  • First item
  • Second item
  • Third item
  • Fourth item

Lever UI home page

Table

The table elements are styled to match the design language of the Table component.

Tables

NameRoleHandle
MaraMaintainermaraellison
TheoDesign engineertheopark
IrisDocs writeririscalder
JonahDeveloper advocatejonahreyes

Customize with CSS

Import @leverui/components/styles.css once in your app. class="not-prose" leaves an element and its children out of the text styles. Target .leverui-prose, or set --leverui-prose-color, --leverui-prose-max-width, --leverui-prose-font-size, and --leverui-prose-line-height on the component. unstyled turns off the default text styles.

Trusted content

Prose does not read Markdown. Give it rendered HTML, or Solid elements from your Markdown renderer. Pass static HTML you trust with Solid's innerHTML. Never pass text you do not trust to innerHTML.