Mockup code with line prefix

Use the `CodeLine` data class to specify content and a prefix for each line.

Preview
npm i daisyui
Dart

Multi line

Provide a list of `CodeLine` objects for multiple lines with different styles.

Preview
npm i daisyui
installing...
Done!
Dart

Highlighted line

Apply background and text color utilities to a specific `CodeLine` to highlight it.

Preview
npm i daisyui
installing...
Error!
Dart

Long line will scroll

The component handles horizontal scrolling for long lines automatically.

Preview
Magnam dolore beatae necessitatibus nemopsum itaque sit. Et porro quae qui et et dolore ratione.
Dart

Without prefix

For simple cases, use the `MockupCode.fromString()` factory for a cleaner API.

Preview
without prefix
Dart

With color

Apply background and text color utilities to the main `MockupCode` component.

Preview
can be any color!
Dart

From a multi-line String (with automatic line numbers)

Use the `MockupCode.fromString()` factory for the easiest implementation. Pass a multi-line string and set `showLineNumbers: true` to automatically prefix each line.

Preview
void main() {
  print('Hello, Deepyr!');
}
Dart

From a List of Strings

Use the `MockupCode.fromList()` factory when your code is already represented as a list of strings. This is useful when processing code dynamically.

Preview
git clone https://github.com/PhilippHGerber/ui_components
cd ui_components/examples/deepyr_example
npm install
jaspr serve
Dart