Printer

Use a Printer to render any hardware variables as text.

Screenshot of component Printer basic

Usage

Printers accept standard accessor strings or StateTree as discussed in the accessors and writers guide.

import { Printer } from '@electricui/components-desktop'
 
<Printer accessor="distance" />

Precision

The precision of floating point numbers is controllable. By default a Printer will render integers without decimal places 128, and floats with two decimal places 3.14.

Screenshot of component Printer with-precision
<Printer accessor="intensity" precision={0} />
<Printer accessor="intensity" precision={1} />
<Printer accessor="intensity" precision={2} />
<Printer accessor="intensity" precision={4} />
<Printer accessor="intensity" precision={8} />

Styling

Pass CSS to the inline span element with style.

<Printer
accessor="intensity"
style={{
fontSize: '4em',
fontWeight: "bold",
color: `${Colors.RED2}`
}}
/>