Skip to content

Add‐ons

imsi32 edited this page Jul 29, 2024 · 1 revision

What are they?

Add-ons are Yazi plugins that have support for yatline.yazi.

Why use them?

They provide extended ways to customize and get new features for yatline.yazi.

Where can they be found?

You can check add-ons.

Creation

Yazi has three types of default components group: string, coloreds and line.
These component groups can be extended easily by following their common structure:

Yatline.TYPE = {}
Yatline.TYPE.get = {}
Yatline.TYPE.has_separator = true
Yatline.TYPE.create(TYPE, component_type)

However, in most cases it will not be necessary to create a new component type group.
You can use default component type groups by renaming your_function() to relevant option:

  • If it returns string: Yatline.string.get.your_function()
  • If it returns coloreds: Yatline.coloreds.get.your_function()
  • If it returns ui.Line(): Yatline.line.get.your_function()

You can get more information about component's type from components page.

Usage

Important

You need to initialize add-on after yatline's initialization.

You can then use your component like this:

{type = "TYPE", custom = false, name = "your_function", params = {IF_ANY}},
Clone this wiki locally