# vim: sw=3 ts=3 ft=org

#+TITLE: Base Element Element
#+STYLE: <LINK href='../stylesheet.css' rel='stylesheet' type='text/css' />
#+AUTHOR: Rusty Klophaus (@rustyio)
#+OPTIONS:   H:2 num:1 toc:1 \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+EMAIL: 
#+TEXT: [[file:../index.org][Getting Started]] | [[file:../api.org][API]] | [[file:../elements.org][*Elements*]] | [[file:../actions.org][Actions]] | [[file:../validators.org][Validators]] | [[file:../handlers.org][Handlers]] | [[file:../config.org][Configuration Options]] | [[file:../about.org][About]]

* Base Element

  In object-oriented parlance, all Nitrogen elements are subclasses of
  the base element. This means that all Nitrogen elements can use the
  attributes listed below.

** Usage

#+BEGIN_SRC erlang
   #some_element { id=myElementID, show_if=true, class="someclass", style="border: solid 1px black;" }
#+END_SRC

** Attributes

   + id - (/atom/) :: The id of the element within the element tree.
                      The id is used to wire events and to reference the element in
                      client side javascript.  See the Nitrogen wiki for more
                      information.

   + actions - (/action, list of actions/) :: The actions to attach to
        the element. This can be a single Nitrogen action, or a list of
        actions.

   + show\_if - (/boolean/) :: If set to true, this element will be
        rendered. Otherwise, it will not.

   + class - (/atom or string/) :: Set the CSS class of the element.

   + style - (/string/) :: Sets inline CSS style on the element.
