{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import panel as pn\n",
    "\n",
    "pn.extension()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The ``BooleanStatus`` is a boolean indicator providing a visual representation of a boolean status as filled or non-filled circle. If the `value` is set to `True` the indicator will be filled while setting it to `False` will cause it to be non-filled.\n",
    "\n",
    "#### Parameters:\n",
    "\n",
    "For details on other options for customizing the component see the [layout](../../how_to/layout/index.md) and [styling](../../how_to/styling/index.md) how-to guides.\n",
    "\n",
    "* **``color``** (str): The color of the circle, one of 'primary', 'secondary', 'success', 'info', 'warn', 'danger', 'light', 'dark'\n",
    "* **``value``** (int or None): Whether the status indicator is filled or not.\n",
    "\n",
    "___"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `BooleanStatus` widget can be instantiated as either `False` or `True`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "false_status = pn.indicators.BooleanStatus(value=False)\n",
    "true_status = pn.indicators.BooleanStatus(value=True)\n",
    "\n",
    "pn.Row(false_status, true_status)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `BooleanStatus` indicator also supports a range of colors:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "grid = pn.GridBox('', 'False', 'True', ncols=3)\n",
    "\n",
    "for color in pn.indicators.BooleanStatus.param.color.objects:\n",
    "    false = pn.indicators.BooleanStatus(width=50, height=50, value=False, color=color)\n",
    "    true = pn.indicators.BooleanStatus(width=50, height=50, value=True, color=color)\n",
    "    grid.extend((color, false, true))\n",
    "\n",
    "grid"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
