Drupal Radix Theme
  • Introduction
    • Overview & Support
  • Installation
    • Requirements
    • Getting Started
    • Setup with ddev
  • Understanding Radix
    • Individual files and directories
    • Bootstrap Build
    • Bootswatch
  • Working with the components
    • Components: Intro
    • Components: A deep dive
    • An example component
    • The drupal-radix-cli
    • Copy and modify a component
  • Components
    • Accordion
    • Alerts
    • Badge
    • Block
    • Buttons
    • Button Group
    • Breadcrumb
    • Card
    • Carousel
    • Close button
    • Comment
    • Collapse
    • Details
    • Dropdown menu
    • Field
    • Field Comment
    • Fieldset
    • Figure
    • Form
    • Form: Element
    • Form Element Label
    • Form Element: Radio Checkbox
    • Heading
    • HTML
    • Image
    • Input
    • List group
    • Local Tasks
    • Media
    • Modal
    • Nav
    • Nav Item
    • Navbar
    • Navbar Brand
    • Node
    • Offcanvas
    • Page
    • Page: Content
    • Page: Footer
    • Page: Navigation
    • Page: Title
    • Pagination
    • Progress
    • Radios
    • Region
    • Select
    • Spinners
    • Table
    • Taxonomy
    • Textarea
    • Toasts
    • Tooltips
    • User
    • Views: view
    • Views: view--grid
    • Views: view--table
    • Views: view--unformatted
  • Misc
    • Migration and upgrading
    • Roadmap
    • Credits & Contributions
Powered by GitBook
On this page
  • Component Properties
  • Usage

Was this helpful?

  1. Components

Offcanvas

Build hidden sidebars into your project for navigation, shopping carts, and more with a few classes and our JavaScript plugin.

PreviousNodeNextPage

Last updated 1 year ago

Was this helpful?

Component Properties

The Offcanvas component takes a variety of properties to customize its appearance and content:

  • offcanvas_title (string) (default: ''): Offcanvas title.

  • offcanvas_title_tag (string) (default: 'h5'): Offcanvas title tag.

  • offcanvas_content (string) (default: ''): Offcanvas content.

  • offcanvas_button_content (string) (default: ''): Offcanvas button content.

  • close_button (bool) (default: true): Close button.

  • body_scrolling (bool) (default: false): Body scrolling.

  • offcanvas_title_attributes (array) (default: []): Offcanvas title attributes.

  • offcanvas_content_attributes (array) (default: []): Offcanvas content attributes.

  • offcanvas_button_attributes (array) (default: []): Offcanvas button attributes.

  • offcanvas_utility_classes (array) (default: []): Offcanvas utility classes.

  • offcanvas_title_utility_classes (array) (default: []): Offcanvas title utility classes.

  • offcanvas_content_utility_classes (array) (default: []): Offcanvas content utility classes.

  • offcanvas_button_utility_classes (array) (default: []): Offcanvas button utility classes.

  • offcanvas_attributes (array) (default: []): Offcanvas attributes.

  • offcanvas_button_attributes (array) (default: []): Offcanvas button attributes.

  • offcanvas_button_utility_classes (array) (default: []): Offcanvas button utility classes.

Usage

{% include 'radix:offcanvas' with {
  offcanvas_title_tag: "h4",
  offcanvas_title: "Offcanvas",
  offcanvas_content: "Some text as placeholder.",
  offcanvas_button_content: "Toggler Button",
  close_button: true,
  body_scrolling: true,
} %}

Bootstrap docs