Designing fzf's interface: height and layout, border, margin, padding, the info line, and customizing the prompt, pointer, marker, header, and colors with the color option.

After episode 3 gave you the search pattern language — fuzzy, exact, prefix, suffix, invert, and OR — now it is time to change the appearance. This episode covers fzf's interactive UI & layout: how to set the window's size and position, border style, empty space, the info line, and the colors and text that greet you every time fzf opens.
Why does appearance matter? Because you will look at this interface hundreds of times a day. A comfortable interface — the right height, a clear prompt, colors that don't strain your eyes — makes fzf feel like a natural part of your workflow, not an annoying popup. And behind all the appearance options hides one important concept we will understand first.
By default, fzf runs full-screen — it covers the entire terminal screen while running. For short lists or quick usage, that feels heavy. The --height option turns fzf into an overlay: a small window anchored to the bottom of the terminal, while the content above it stays visible.
printf "a\nb\nc\nd\ne\n" | fzf --height=40%The --height value can be a percentage (40%) or a line count (10). When used as an overlay, fzf won't even scroll the terminal content — it overwrites the bottom part of the screen and restores it when done. This is the main reason many fzf users put --height=40% in their default configuration.
One concept that often confuses people: the list direction is set by --layout, not --height. There are three choices:
| Option | Behavior |
|---|---|
--layout=default | Prompt and list at the top; the list runs top to bottom |
--layout=reverse | Prompt at the bottom; the list runs bottom to top |
--layout=reverse-list | Prompt at the top, but the list runs bottom to top |
reverse is a favorite for two reasons: the best items always appear closest to the prompt (no need to press j many times), and its position mimics modern menu behavior. reverse-list keeps the prompt on top while still placing the best results at the bottom of the screen — a good compromise for narrow screens.
printf "a\nb\nc\n" | fzf --height=40% --layout=reverse --borderTry all three layouts often: the habit of looking at lists is very personal, and the right choice feels like a "click" when you find it.
After height and layout, three options control the interface "frame":
| Option | Meaning |
|---|---|
--border | The border line; can be rounded (default), sharp, double, or none |
--margin | Empty space outside the border, from the terminal edge |
--padding | Empty space inside the border, before the content |
printf "a\nb\nc\n" | fzf --height=50% --border=sharp --padding=1The --margin and --padding values can be a single number (all sides), two (top,bottom) or four (top,right,bottom,left). Margins are very useful in terminals with several panels — you can reserve space so fzf doesn't cover important information — while padding gives the content "breathing room" inside the border.
The info line is the small text showing the pointer position and the number of matching items, for example 2/10. The --info option controls where this line appears:
| Option | Behavior |
|---|---|
--info=default | Info on the left, separated from the prompt |
--info=inline | Info joined to the right of the prompt in one line |
--info=inline-right | Info at the far right end of the prompt line |
--info=hidden | Hide the info completely |
printf "a\nb\nc\n" | fzf --height=30% --info=inline --prompt="pilih: "The inline and inline-right styles make the interface feel cleaner because they combine the prompt and info on one line — without a separate line eating up space.
These four options control the most visible text and symbols in the interface:
| Option | Function |
|---|---|
--prompt | The text in front of the query input area (default > ) |
--pointer | The active-item pointer symbol in the list (default >) |
--marker | The selected-item symbol in multi-select mode (default >) |
--header | A text line above the list; can span multiple lines |
printf "a\nb\nc\n" | fzf --prompt="cari: " --pointer="->" --header="Tekan enter untuk memilih"A descriptive prompt helps a lot when fzf is used for different lists — for example cari file: for files and cari branch: for git. A header can display a short hint, such as --header="Tekan tab untuk multi-select", so you don't have to memorize keybindings.
fzf's color control is centralized in one option: --color. Its format is a comma-separated list of part:color pairs. The parts most frequently configured:
| Part | Function |
|---|---|
fg / bg | General text and background colors |
hl | The color of characters matching the query |
prompt | The prompt text color |
pointer | The pointer symbol color |
marker | The multi-select marker symbol color |
gutter | The color of the empty column on the left of the list |
info | The info line color |
printf "a\nb\nc\n" | fzf --color=prompt:#50fa7b,pointer:#ff79c6,hl:#bd93f9Colors can be names (green, red), numbers, or hex codes like the ones above. Note gutter — a part that is often forgotten even though it determines whether the left column (where the pointer lives) looks like a unified part of the list or like a separate bar. For daily use, combine all these preferences in FZF_DEFAULT_OPTS:
export FZF_DEFAULT_OPTS="--height=40% --layout=reverse --border --info=inline --prompt='> ' --pointer='>' --color=prompt:#50fa7b,pointer:#ff79c6,hl:#bd93f9"The export above — which you can put in ~/.bashrc as we discussed in episode 0 — will make every fzf on your system use the same look. Change the colors to match your terminal theme, and don't be afraid to experiment: these options can't break anything.
In this episode 4, you designed fzf's interface: the overlay concept with --height, three list directions with --layout, the frame with --border, space with --margin and --padding, the info line with --info, text and symbols with --prompt, --pointer, --marker, and --header, and colors with --color.
The key takeaways:
--height=40% turns fzf into an overlay that doesn't cover the full screen.--layout=default/reverse/reverse-list controls the list direction — try them and pick your favorite.--border, --margin, --padding control the frame; --info controls the info line.--prompt, --pointer, --marker, --header control text and symbols.--color=part:color controls colors; collect all your preferences in FZF_DEFAULT_OPTS.In the next episode, episode 5, we will learn to move quickly inside fzf: basic navigation & keybindings — vim-style keys and jump mode for the item list, readline shortcuts for editing the query, and how to select and exit, including multi-select. See you in episode 5!