Django CarbonDesign

Contents

  • Getting Started
  • Advanced Usage

Carbon Design Components

  • Accordion
  • Breadcrumb
  • Button
  • Checkbox
  • Code Snippet
  • Combo Box
  • Content Switcher
  • Copy Button
  • Data Table
  • Date Picker
  • Dropdown
  • File Uploader
  • Grid
  • Inline Loading
  • Link
  • List
  • List Box
  • Loading
  • Modal
  • Multi Select
  • Notification
  • Number Input
  • Overflow Menu
  • Pagination
  • Pagination Nav
  • Progress Indicator
  • Radio Button
  • Search
  • Select
  • Slider
  • Structured List
  • Tabs
  • Tag
  • Text Area
  • Text Input
  • Tile
  • Time Picker
  • Toggle
  • Toolbar
  • Tooltip
  • UI Shell
  • UI Shell Switcher
Django CarbonDesign
  • »
  • Dropdown
  • View page source

Dropdown

See: https://www.carbondesignsystem.com/components/dropdown/usage/

This module is currently disabled, it’s a weird component that receive input, but there is no html input element. Wait and see its progress.

Dropdowns present a list of options from which a user can select one option, or several. A selected option can represent a value in a form, or can be used as an action to filter or sort existing content.

Overview

There are three different variants of dropdowns that support various kinds of functionality—dropdown, multiselect, and combo box.

class carbondesign.tags.dropdown.Dropdown(*args, **kwargs)

Dropdown component.

WANT_CHILDREN = True

Template Tag needs closing end tag.

SLOTS = ('help', 'errors')

Named children.

NODE_PROPS = ('id', 'value', 'disabled', 'up', 'light', 'inline')

Extended Template Tag arguments.

CLASS_AND_PROPS = ('label', 'help', 'wrapper', 'dropdown')

Prepare xxx_class and xxx_props values.

prepare(values, context)

Prepare values for rendering the templates.

render_default(values, context)

Output html of the component.

render_slot_help(values, context)

Render html of the slot.

class carbondesign.tags.dropdown.DropdownItem(*args, **kwargs)

Dropdown item component.

WANT_CHILDREN = True

Template Tag needs closing end tag.

SLOTS = ('icon',)

Named children.

NODE_PROPS = ('active', 'value')

Extended Template Tag arguments.

prepare(values, context)

Prepare values for rendering the templates.

render_default(values, context)

Output html of the component.

render_slot_icon(values, context)

Render html of the slot.

Previous Next

© Copyright 2022, Fahri Reza <i@dozy.moe>.

Built with Sphinx using a theme provided by Read the Docs.