Boolean
The Boolean field renders a checkbox on form views and a green check or red X icon on the Index and Show views.
# app/avo/resources/post.rb
class Avo::Resources::Post < Avo::BaseResource
def fields
field :is_published, as: :boolean, name: "Published"
end
endWithout additional options, forms use a checkbox, true and false values display their respective icons, and nil displays a dash.

Display a custom stored value as true
If your column stores "yes" rather than a Boolean, set true_value so it displays as checked. Avo also recognizes the strings "true" and "1" as true.
# app/avo/resources/post.rb
field :is_published, as: :boolean, true_value: "yes", false_value: "no"Custom storage on forms
false_value does not define a separate false-value mapping for display. Present values that do not match a recognized true value display as false. Neither option changes the checkbox's submitted values: forms submit "1" when checked and "0" when unchecked. If your model stores custom values, handle that conversion in the model.
Make missing values more visible
If you want to distinguish an unset value from true or false at a glance, enable nil_as_indeterminate. On Index and Show views, nil then displays a gray minus-circle icon instead of a dash. This does not change the stored value or add a third checkbox state to forms.
# app/avo/resources/post.rb
field :is_published, as: :boolean, nil_as_indeterminate: true
Use a toggle on forms
Enable as_toggle to style the checkbox as a toggle. It keeps the same checked and unchecked behavior and only changes the form's appearance.
# app/avo/resources/post.rb
field :is_published, as: :boolean, as_toggle: trueOptions reference
See the Boolean API for all four field-specific options and their defaults. For options shared by fields, such as names, visibility, and help text, see Field options.