Skip to content

Commit

Permalink
remove pills from tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Dec 6, 2023
1 parent 4160eaa commit cdb61ef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
2 changes: 1 addition & 1 deletion docs/3.0/common/avo_in_gemfile.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```ruby
# Aadd one of the following in your Gemfile depending on the tier you are on.
# Add one of the following in your Gemfile depending on the tier you are on.

# Avo Community
gem 'avo', '~> 3.0', '>= 3.0.2'
Expand Down
35 changes: 0 additions & 35 deletions docs/3.0/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,41 +52,6 @@ Tabs have more than an aesthetic function. They have a performance function too.

All visibility rules still apply on' Edit', meaning that `has_*` fields will be hidden by default. However, you can enable them by adding `show_on: :edit`. All other fields will be loaded and hidden on page load. This way, when you submit a form, if you have validation rules in place requiring a field that's in a hidden tab, it will be present on the page on submit-time.

## Display as pills

<div class="space-x-2">
<VersionReq version="2.14" class="mt-2" />
<DemoVideo demo-video="https://youtu.be/peKt90XhdOg?t=710" />
</div>

When you have a lot of tabs in one group the tab switcher will overflow on the right-hand side. It will become scrollable to allow your users to get to the last tabs in the group.

![](/assets/img/tabs-and-panels/scrollable-tabs.gif)

If you want to be able to see all your tabs in one group at a glance you may change the display to `:pills`. The pills will collapse and won't overflow off the page.

![](/assets/img/tabs-and-panels/tabs-as-pills.gif)

### Display all tabs as pills

If you want to display all tabs as pills update your initializer's `tabs_style`.

```ruby
Avo.configure do |config|
config.tabs_style = :pills
end
```

### Display only some tabs as pills

If you only need to display certain tabs as pills you can do that using the `style` option.

```ruby
tabs style: :pills do
# tabs go here
end
```

<!-- The panel has a few parts available -->


Expand Down

0 comments on commit cdb61ef

Please sign in to comment.