No release in over 3 years
Low commit activity in last 3 years
extension for activeadmin gem to manage sidebar
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 3.0, < 4.0
 Project Readme

Gem Version NPM Version npm Coverage

ActiveAdmin Sidebar

Manipulate sidebar position and add collapsible sidebar support for ActiveAdmin 3.x.

Install

Add to your Gemfile:

gem 'active_admin_sidebar'

Using assets via Sprockets

Add to app/assets/stylesheets/active_admin.scss:

@import "active_admin_sidebar";

Add to app/assets/javascripts/active_admin.js:

//= require active_admin_sidebar

Using assets via NPM

$ npm i @activeadmin-plugins/active_admin_sidebar

Or

$ yarn add @activeadmin-plugins/active_admin_sidebar

Add to app/assets/javascripts/active_admin.js:

import '@activeadmin-plugins/active_admin_sidebar';

Add to app/assets/stylesheets/active_admin.scss:

@import '@activeadmin-plugins/active_admin_sidebar';

Configuration per resource

Change sidebar position with before_action:

# app/admin/posts.rb
ActiveAdmin.register Post do
  before_action only: [:index] do
    left_sidebar!
  end
end

# app/admin/comments.rb
ActiveAdmin.register Comment do
  before_action do
    right_sidebar!
  end
end

Global configuration

Move sidebar to the left for all resources in config/initializers/active_admin.rb:

ActiveAdmin.setup do |config|
  config.before_action do
    left_sidebar! if respond_to?(:left_sidebar!)
  end
end

Collapsible sidebar

Add a toggle button to collapse/expand the sidebar. State is persisted per-resource across page navigations.

# Collapsible sidebar (starts expanded)
left_sidebar!(collapsible: true)
right_sidebar!(collapsible: true)

# Collapsible sidebar (starts collapsed)
left_sidebar!(collapsible: true, start_collapsed: true)
right_sidebar!(collapsible: true, start_collapsed: true)

Demo