HTML

Reflex also provides a set of HTML elements that can be used to create web pages. These elements are the same as the HTML elements that are used in web development. These elements come unstyled bhy default. You can style them using style props or tailwindcss classes.

The following is a list of the HTML elements that are available in Reflex:

API Reference

rx.el.A

Display the 'a' element.

PropType | ValuesDefault
download
Union[str, bool]
href
str
href_lang
str
media
str
ping
str
referrer_policy
"" | "no-referrer" | ...
rel
str
target
"_self" | "_blank" | ...

Event Triggers

See the full list of default event triggers

rx.el.Abbr

Display the abbr element.

Props

No component specific props

rx.el.Address

Display the address element.

Props

No component specific props

rx.el.Area

Display the area element.

PropType | ValuesDefault
alt
str
coords
str
download
Union[str, bool]
href
str
href_lang
str
media
str
referrer_policy
"" | "no-referrer" | ...
rel
str
shape
str
target
str

rx.el.Article

Display the article element.

Props

No component specific props

rx.el.Aside

Display the aside element.

Props

No component specific props

rx.el.Audio

Display the audio element.

PropType | ValuesDefault
auto_play
bool
controls
bool
cross_origin
"anonymous" | "use-credentials" | ...
loop
bool
muted
bool
preload
str
src
str

rx.el.B

Display the b element.

Props

No component specific props

rx.el.Bdi

Display the bdi element.

Props

No component specific props

rx.el.Bdo

Display the bdo element.

Props

No component specific props

rx.el.Blockquote

Display the blockquote element.

PropType | ValuesDefault
cite
str

rx.el.Body

Display the body element.

Props

No component specific props

rx.el.Br

Display the br element.

Props

No component specific props

rx.el.Button

Display the button element.

PropType | ValuesDefault
auto_focus
bool
disabled
bool
form
str
form_action
str
form_enc_type
str
form_method
str
form_no_validate
bool
form_target
str
name
str
type
"submit" | "reset" | ...
value
Union[str, int, float]

rx.el.Canvas

Display the canvas element.

Props

No component specific props

rx.el.Caption

Display the caption element.

Props

No component specific props

rx.el.Cite

Display the cite element.

Props

No component specific props

rx.el.Code

Display the code element.

Props

No component specific props

rx.el.Col

Display the col element.

PropType | ValuesDefault
span
int

rx.el.Colgroup

Display the colgroup element.

PropType | ValuesDefault
span
int

rx.el.Data

Display the data element.

PropType | ValuesDefault
value
Union[str, int, float]

rx.el.Dd

Display the dd element.

Props

No component specific props

rx.el.Del

Display the del element.

PropType | ValuesDefault
cite
str
date_time
str

rx.el.Details

Display the details element.

PropType | ValuesDefault
open
bool

rx.el.Dfn

Display the dfn element.

Props

No component specific props

rx.el.Dialog

Display the dialog element.

PropType | ValuesDefault
open
bool

rx.el.Div

Display the div element.

Props

No component specific props

rx.el.Dl

Display the dl element.

Props

No component specific props

rx.el.Dt

Display the dt element.

Props

No component specific props

rx.el.Em

Display the em element.

Props

No component specific props

rx.el.Embed

Display the embed element.

PropType | ValuesDefault
src
str
type
str

rx.el.Fieldset

Display the fieldset element.

PropType | ValuesDefault
disabled
bool
form
str
name
str

rx.el.Figcaption

Display the figcaption element.

Props

No component specific props

rx.el.Footer

Display the footer element.

Props

No component specific props

rx.el.Form

Display the form element.

PropType | ValuesDefault
accept
str
accept_charset
str
action
str
auto_complete
str
enc_type
str
method
str
name
str
no_validate
bool
target
str
reset_on_submit
bool
Var.create(False)
handle_submit_unique_name
str

Event Triggers

See the full list of default event triggers
TriggerDescription
on_submit Fired when the form is submitted

rx.el.H1

Display the h1 element.

Props

No component specific props

rx.el.H2

Display the h1 element.

Props

No component specific props

rx.el.H3

Display the h1 element.

Props

No component specific props

rx.el.H4

Display the h1 element.

Props

No component specific props

rx.el.H5

Display the h1 element.

Props

No component specific props

rx.el.H6

Display the h1 element.

Props

No component specific props

rx.el.Head

Display the head element.

Props

No component specific props

rx.el.Header

Display the header element.

Props

No component specific props

rx.el.Hr

Display the hr element.

Props

No component specific props

rx.el.Html

Display the html element.

PropType | ValuesDefault
manifest
str

rx.el.I

Display the i element.

Props

No component specific props

rx.el.Iframe

Display the iframe element.

PropType | ValuesDefault
allow
str
loading
"eager" | "lazy"
name
str
referrer_policy
"" | "no-referrer" | ...
sandbox
str
src
str
src_doc
str

rx.el.Img

Display the img element.

PropType | ValuesDefault
alt
str
cross_origin
"anonymous" | "use-credentials" | ...
decoding
"async" | "auto" | ...
loading
"eager" | "lazy"
referrer_policy
"" | "no-referrer" | ...
sizes
str
src
Any
src_set
str
use_map
str

rx.el.Input

Display the input element.

PropType | ValuesDefault
accept
str
alt
str
auto_complete
str
auto_focus
bool
capture
"True" | "False" | ...
checked
bool
default_checked
bool
default_value
Union[str, int, float]
disabled
bool
form
str
form_action
str
form_enc_type
str
form_method
str
form_no_validate
bool
form_target
str
list
str
max
Union[str, int, float]
max_length
Union[int, float]
min_length
Union[int, float]
min
Union[str, int, float]
multiple
bool
name
str
pattern
str
placeholder
str
read_only
bool
required
bool
size
Union[int, float]
src
str
step
Union[str, int, float]
type
"button" | "checkbox" | ...
value
Union[str, int, float]

Event Triggers

See the full list of default event triggers
TriggerDescription
on_focus Fired when the input gains focus
on_blur Fired when the input loses focus
on_change Fired when the input value changes
on_key_down Fired when a key is pressed down
on_key_up Fired when a key is released

rx.el.Ins

Display the ins element.

PropType | ValuesDefault
cite
str
date_time
str

rx.el.Kbd

Display the kbd element.

Props

No component specific props

rx.el.Label

Display the label element.

PropType | ValuesDefault
html_for
str
form
str

rx.el.Legend

Display the legend element.

Props

No component specific props

rx.el.Li

Display the li element.

Props

No component specific props

Display the link element.

PropType | ValuesDefault
cross_origin
"anonymous" | "use-credentials" | ...
href
str
href_lang
str
integrity
str
media
str
referrer_policy
"" | "no-referrer" | ...
rel
str
sizes
str
type
str

rx.el.Main

Display the main element.

Props

No component specific props

rx.el.Mark

Display the mark element.

Props

No component specific props

rx.el.Math

Display the math element.

Props

No component specific props

rx.el.Meta

Display the meta element.

PropType | ValuesDefault
char_set
str
content
str
http_equiv
str
name
str

rx.el.Meter

Display the meter element.

PropType | ValuesDefault
form
str
high
Union[int, float]
low
Union[int, float]
max
Union[int, float]
min
Union[int, float]
optimum
Union[int, float]
value
Union[int, float]

rx.el.Nav

Display the nav element.

Props

No component specific props

rx.el.Noscript

Display the noscript element.

Props

No component specific props

rx.el.Object

Display the object element.

PropType | ValuesDefault
data
str
form
str
name
str
type
str
use_map
str

rx.el.Ol

Display the ol element.

PropType | ValuesDefault
reversed
bool
start
int
type
"1" | "a" | ...

rx.el.Optgroup

Display the optgroup element.

PropType | ValuesDefault
disabled
bool
label
str

rx.el.Option

Display the option element.

PropType | ValuesDefault
disabled
bool
label
str
selected
bool
value
Union[str, int, float]

rx.el.Output

Display the output element.

PropType | ValuesDefault
html_for
str
form
str
name
str

rx.el.P

Display the p element.

Props

No component specific props

rx.el.Picture

Display the picture element.

Props

No component specific props

rx.el.Portal

Display the portal element.

Props

No component specific props

rx.el.Pre

Display the pre element.

Props

No component specific props

rx.el.Progress

Display the progress element.

PropType | ValuesDefault
form
str
max
Union[str, int, float]
value
Union[str, int, float]

rx.el.Q

Display the q element.

PropType | ValuesDefault
cite
str

rx.el.Rp

Display the rp element.

Props

No component specific props

rx.el.Rt

Display the rt element.

Props

No component specific props

rx.el.Ruby

Display the ruby element.

Props

No component specific props

rx.el.S

Display the s element.

Props

No component specific props

rx.el.Samp

Display the samp element.

Props

No component specific props

rx.el.Script

Display the script element.

PropType | ValuesDefault
async_
bool
char_set
str
cross_origin
"anonymous" | "use-credentials" | ...
defer
bool
integrity
str
referrer_policy
"" | "no-referrer" | ...
src
str
type
str

rx.el.Section

Display the section element.

Props

No component specific props

rx.el.Select

Display the select element.

PropType | ValuesDefault
auto_complete
str
auto_focus
bool
disabled
bool
form
str
multiple
bool
name
str
required
bool
size
int

Event Triggers

See the full list of default event triggers
TriggerDescription
on_change Fired when the select value changes

rx.el.Small

Display the small element.

Props

No component specific props

rx.el.Source

Display the source element.

PropType | ValuesDefault
media
str
sizes
str
src
str
src_set
str
type
str

rx.el.Span

Display the span element.

Props

No component specific props

rx.el.Strong

Display the strong element.

Props

No component specific props

rx.el.Sub

Display the sub element.

Props

No component specific props

rx.el.Sup

Display the sup element.

Props

No component specific props

rx.el.svg.circle

The SVG circle component.

PropType | ValuesDefault
cx
Union[str, int]
cy
Union[str, int]
r
Union[str, int]
path_length
int

rx.el.svg.defs

Display the defs element.

Props

No component specific props

rx.el.svg.linear_gradient

Display the linearGradient element.

PropType | ValuesDefault
gradient_units
Union[str, bool]
gradient_transform
Union[str, bool]
spread_method
Union[str, bool]
x1
Union[str, int, float]
x2
Union[str, int, float]
y1
Union[str, int, float]
y2
Union[str, int, float]

rx.el.svg.polygon

The SVG polygon component.

PropType | ValuesDefault
points
str
path_length
int

rx.el.svg.path

Display the path element.

PropType | ValuesDefault
d
Union[str, int, float]

rx.el.svg.rect

The SVG rect component.

PropType | ValuesDefault
x
Union[str, int]
y
Union[str, int]
width
Union[str, int]
height
Union[str, int]
rx
Union[str, int]
ry
Union[str, int]
path_length
int

rx.el.svg.stop

Display the stop element.

PropType | ValuesDefault
offset
Union[str, int, float]
stop_color
Union[str, Color, bool]
stop_opacity
Union[str, float, int, bool]

rx.el.Table

Display the table element.

PropType | ValuesDefault
align
"left" | "center" | ...
summary
str

rx.el.Tbody

Display the tbody element.

Props

No component specific props

rx.el.Td

Display the td element.

PropType | ValuesDefault
align
"left" | "center" | ...
col_span
int
headers
str
row_span
int

rx.el.Template

Display the template element.

Props

No component specific props

rx.el.Textarea

Display the textarea element.

PropType | ValuesDefault
auto_complete
str
auto_focus
bool
auto_height
bool
cols
int
default_value
str
dirname
str
disabled
bool
enter_key_submit
bool
form
str
max_length
int
min_length
int
name
str
placeholder
str
read_only
bool
required
bool
rows
int
value
str
wrap
str

Event Triggers

See the full list of default event triggers
TriggerDescription
on_focus Fired when the input gains focus
on_blur Fired when the input loses focus
on_change Fired when the input value changes
on_key_down Fired when a key is pressed down
on_key_up Fired when a key is released

rx.el.Tfoot

Display the tfoot element.

Props

No component specific props

rx.el.Th

Display the th element.

PropType | ValuesDefault
align
"left" | "center" | ...
col_span
int
headers
str
row_span
int
scope
str

rx.el.Thead

Display the thead element.

Props

No component specific props

rx.el.Time

Display the time element.

PropType | ValuesDefault
date_time
str

rx.el.Title

Display the title element.

Props

No component specific props

rx.el.Tr

Display the tr element.

Props

No component specific props

rx.el.Track

Display the track element.

PropType | ValuesDefault
default
bool
kind
str
label
str
src
str
src_lang
str

rx.el.U

Display the u element.

Props

No component specific props

rx.el.Ul

Display the ul element.

Props

No component specific props

rx.el.Video

Display the video element.

PropType | ValuesDefault
auto_play
bool
controls
bool
cross_origin
"anonymous" | "use-credentials" | ...
loop
bool
muted
bool
plays_inline
bool
poster
str
preload
str
src
str

rx.el.Wbr

Display the wbr element.

Props

No component specific props

Built with Reflex