For AI agents: the complete documentation index is at llms.txt. Remove the trailing slash from a page URL and append .md to read its Markdown version. For the docs home, use index.md.

HTML Layout Elements

Document structure and layout HTML elements are available through the rx.el namespace.

API Reference

Shared HTML props

Components linked to this section accept these HTML props. Component-specific additions and overrides are listed below.

Props

PropTypeDescription
access_key
str

Provides a hint for generating a keyboard shortcut for the current element.

auto_capitalize
"off""none""on""sentences""words""characters"

Controls whether and how text input is automatically capitalized as it is entered/edited by the user.

content_editable
"inherit""plaintext-only"

Indicates whether the element's content is editable.

context_menu
str

Defines the ID of a <menu> element which will serve as the element's context menu.

dir
str

Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left).

draggable
bool

Defines whether the element can be dragged.

enter_key_hint
"enter""done""go""next""previous""search""send"

Hints what media types the media element is able to play.

hidden
bool

Defines whether the element is hidden.

input_mode
"none""text""tel""url""email""numeric""decimal""search"

Defines the type of the element.

item_prop
str

Defines the name of the element for metadata purposes.

lang
str

Defines the language used in the element.

role
"alert""alertdialog""application""article""banner""button""cell""checkbox""columnheader""combobox""complementary""contentinfo""definition""dialog""directory""document""feed""figure""form""grid""gridcell""group""heading""img""link""list""listbox""listitem""log""main""marquee""math""menu""menubar""menuitem""menuitemcheckbox""menuitemradio""navigation""none""note""option""presentation""progressbar""radio""radiogroup""region""row""rowgroup""rowheader""scrollbar""search""searchbox""separator""slider""spinbutton""status""switch""tab""table""tablist""tabpanel""term""textbox""timer""toolbar""tooltip""tree""treegrid""treeitem"

Defines the role of the element.

slot
str

Assigns a slot in a shadow DOM shadow tree to an element.

spell_check
bool

Defines whether the element may be checked for spelling errors.

tab_index
int

Defines the position of the current element in the tabbing order.

title
str

Defines a tooltip for the element.

rx.el.address

Display the address element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.article

Display the article element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.aside

Display the aside element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.blockquote

Display the blockquote element.

Props

PropTypeDescription
cite
str

Define the title of a work.

Also accepts the shared HTML props.

rx.el.body

Display the body element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.dd

Display the dd element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.del

Display the del element.

Props

PropTypeDescription
cite
str

Specifies the URL of the document that explains the reason why the text was deleted.

date_time
str

Specifies the date and time of when the text was deleted.

Also accepts the shared HTML props.

rx.el.details

Display the details element.

Props

PropTypeDescription
open
bool

Indicates whether the details will be visible (expanded) to the user.

Also accepts the shared HTML props.

rx.el.dialog

Display the dialog element.

Props

PropTypeDescription
open
bool

Indicates whether the dialog is active and can be interacted with.

Also accepts the shared HTML props.

rx.el.dl

Display the dl element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.dt

Display the dt element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.figcaption

Display the figcaption element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.footer

Display the footer element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.h1

Display the h1 element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.h2

Display the h1 element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.h3

Display the h1 element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.h4

Display the h1 element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.h5

Display the h1 element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.h6

Display the h1 element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.head

Display the head element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.header

Display the header element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.hr

Display the hr element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.html

Display the html element.

Props

PropTypeDescription
manifest
str

Specifies the URL of the document's cache manifest (obsolete in HTML5).

Also accepts the shared HTML props.

rx.el.li

Display the li element.

Props

No component specific props

Also accepts the shared HTML props.

Display the link element.

Props

PropTypeDescription
cross_origin
"anonymous""use-credentials"""

Specifies the CORS settings for the linked resource.

href
str

Specifies the URL of the linked document/resource.

href_lang
str

Specifies the language of the text in the linked document.

integrity
str

Allows a browser to check the fetched link for integrity.

media
str

Specifies on what device the linked document will be displayed.

referrer_policy
"""no-referrer""no-referrer-when-downgrade""origin""origin-when-cross-origin""same-origin""strict-origin""strict-origin-when-cross-origin""unsafe-url"

Specifies the referrer policy of the linked document.

rel
str

Specifies the relationship between the current document and the linked one.

sizes
str

Specifies the sizes of icons for visual media.

type
str

Specifies the MIME type of the linked document.

Also accepts the shared HTML props.

rx.el.main

Display the main element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.nav

Display the nav element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.noscript

Display the noscript element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.ol

Display the ol element.

Props

PropTypeDescription
reversed
bool

Reverses the order of the list.

start
int

Specifies the start value of the first list item in an ordered list.

type
"1""a""A""i""I"

Specifies the kind of marker to use in the list (letters or numbers).

Also accepts the shared HTML props.

rx.el.portal

Display the portal element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.pre

Display the pre element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.script

Display the script element.

Props

PropTypeDescription
async_
bool

Indicates that the script should be executed asynchronously.

char_set
str

Character encoding of the external script.

cross_origin
"anonymous""use-credentials"""

Configures the CORS requests for the script.

defer
bool

Indicates that the script should be executed after the page has finished parsing.

integrity
str

Security feature allowing browsers to verify what they fetch.

referrer_policy
"""no-referrer""no-referrer-when-downgrade""origin""origin-when-cross-origin""same-origin""strict-origin""strict-origin-when-cross-origin""unsafe-url"

Specifies which referrer information to send when fetching the script.

src
str

URL of an external script.

type
str

Specifies the MIME type of the script.

Also accepts the shared HTML props.

rx.el.section

Display the section element.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.template

Display the template element.

Used for declaring fragments of HTML that can be cloned and inserted in the document.

Props

No component specific props

Also accepts the shared HTML props.

rx.el.title

Display the title element.

Props

No component specific props

rx.el.ul

Display the ul element.

Props

No component specific props

Also accepts the shared HTML props.