rafal.siepak PRO said over 2 years ago on Slim Select with Stimulus :
I have made it work by putting directly @import "slim-select/dist/slimselect.css" into application.tailwind.css.

Another question I have is I want to render html under index page, but right now after applying the code I only render json. How to make both work HTML and json?

class CategoriesController < ApplicationController
  def index
    @categories = Category.where("name like ?", "%#{params[:query]}%")
    render json: @categories.map { |c| { value: c.id, text: c.name } }
  end
end