Struct dioxus_html::div
source · pub struct div;
Expand description
Build a
<div>
element.
Part of the HTML namespace. Only works in HTML-compatible renderers
Definition and Usage
- The tag defines a division or a section in an HTML document.
- The
tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript.- The
tag is easily styled by using the class or id attribute.- Any sort of content can be put inside the
tag!Note: By default, browsers always place a line break before and after the
element.Usage
ⓘhtml!(<div> A header element </div>) rsx!(div { "A header element" }) LazyNodes::new(|f| f.element(div, &[], &[], &[], None))
References:
Implementations§
Trait Implementations§
source§ impl GlobalAttributes for div
source§ const prevent_default: AttributeDiscription = _
Prevent the default action for this element. Read moresource§ const accesskey: AttributeDiscription = _
source§ const autocapitalize: AttributeDiscription = _
source§ const autofocus: AttributeDiscription = _
source§ const class: AttributeDiscription = _
The HTML class attribute is used to specify a class for an HTML element. Read moresource§ const contenteditable: AttributeDiscription = _
source§ const data: AttributeDiscription = _
source§ const dir: AttributeDiscription = _
source§ const draggable: AttributeDiscription = _
source§ const enterkeyhint: AttributeDiscription = _
source§ const exportparts: AttributeDiscription = _
source§ const id: AttributeDiscription = _
source§ const inputmode: AttributeDiscription = _
source§ const is: AttributeDiscription = _
source§ const itemid: AttributeDiscription = _
source§ const itemprop: AttributeDiscription = _
source§ const itemref: AttributeDiscription = _
source§ const itemscope: AttributeDiscription = _
source§ const itemtype: AttributeDiscription = _
source§ const lang: AttributeDiscription = _
source§ const nonce: AttributeDiscription = _
source§ const part: AttributeDiscription = _
source§ const role: AttributeDiscription = _
source§ const slot: AttributeDiscription = _
source§ const spellcheck: AttributeDiscription = _
source§ const style: AttributeDiscription = _
source§ const tabindex: AttributeDiscription = _
source§ const title: AttributeDiscription = _
source§ const translate: AttributeDiscription = _
source§ const dangerous_inner_html: AttributeDiscription = _
dangerous_inner_html is Dioxus’s replacement for using innerHTML in the browser DOM. In general, setting HTML from code is risky because it’s easy to inadvertently expose your users to a cross-site scripting (XSS) attack. So, you can set HTML directly from Dioxus, but you have to type out dangerous_inner_html to remind yourself that it’s dangeroussource§ const align_content: AttributeDiscription = _
source§ const align_items: AttributeDiscription = _
source§ const align_self: AttributeDiscription = _
source§ const alignment_adjust: AttributeDiscription = _
source§ const alignment_baseline: AttributeDiscription = _
source§ const animation: AttributeDiscription = _
source§ const animation_delay: AttributeDiscription = _
source§ const animation_direction: AttributeDiscription = _
source§ const animation_duration: AttributeDiscription = _
source§ const animation_fill_mode: AttributeDiscription = _
source§ const animation_name: AttributeDiscription = _
source§ const animation_play_state: AttributeDiscription = _
source§ const azimuth: AttributeDiscription = _
source§ const backface_visibility: AttributeDiscription = _
source§ const background: AttributeDiscription = _
source§ const background_attachment: AttributeDiscription = _
source§ const background_clip: AttributeDiscription = _
source§ const background_color: AttributeDiscription = _
source§ const background_image: AttributeDiscription = _
source§ const background_origin: AttributeDiscription = _
source§ const background_position: AttributeDiscription = _
source§ const background_repeat: AttributeDiscription = _
source§ const background_size: AttributeDiscription = _
source§ const background_blend_mode: AttributeDiscription = _
source§ const baseline_shift: AttributeDiscription = _
source§ const bookmark_label: AttributeDiscription = _
source§ const bookmark_level: AttributeDiscription = _
source§ const bookmark_state: AttributeDiscription = _
source§ const border: AttributeDiscription = _
source§ const border_color: AttributeDiscription = _
source§ const border_style: AttributeDiscription = _
source§ const border_width: AttributeDiscription = _
source§ const border_bottom: AttributeDiscription = _
source§ const border_bottom_color: AttributeDiscription = _
source§ const border_bottom_style: AttributeDiscription = _
source§ const border_bottom_width: AttributeDiscription = _
source§ const border_left: AttributeDiscription = _
source§ const border_left_color: AttributeDiscription = _
source§ const border_left_style: AttributeDiscription = _
source§ const border_left_width: AttributeDiscription = _
source§ const border_right: AttributeDiscription = _
source§ const border_right_color: AttributeDiscription = _
source§ const border_right_style: AttributeDiscription = _
source§ const border_right_width: AttributeDiscription = _
source§ const border_top: AttributeDiscription = _
source§ const border_top_color: AttributeDiscription = _
source§ const border_top_style: AttributeDiscription = _
source§ const border_top_width: AttributeDiscription = _
source§ const border_collapse: AttributeDiscription = _
source§ const border_image: AttributeDiscription = _
source§ const border_image_outset: AttributeDiscription = _
source§ const border_image_repeat: AttributeDiscription = _
source§ const border_image_slice: AttributeDiscription = _
source§ const border_image_source: AttributeDiscription = _
source§ const border_image_width: AttributeDiscription = _
source§ const border_radius: AttributeDiscription = _
source§ const border_spacing: AttributeDiscription = _
source§ const bottom: AttributeDiscription = _
source§ const box_decoration_break: AttributeDiscription = _
source§ const box_shadow: AttributeDiscription = _
source§ const box_sizing: AttributeDiscription = _
source§ const box_snap: AttributeDiscription = _
source§ const break_after: AttributeDiscription = _
source§ const break_before: AttributeDiscription = _
source§ const break_inside: AttributeDiscription = _
source§ const buffered_rendering: AttributeDiscription = _
source§ const clear_side: AttributeDiscription = _
source§ const clip_path: AttributeDiscription = _
source§ const clip_rule: AttributeDiscription = _
source§ const color_adjust: AttributeDiscription = _
source§ const color_correction: AttributeDiscription = _
source§ const color_interpolation: AttributeDiscription = _
source§ const color_profile: AttributeDiscription = _
source§ const color_rendering: AttributeDiscription = _
source§ const column_fill: AttributeDiscription = _
source§ const column_gap: AttributeDiscription = _
source§ const column_rule: AttributeDiscription = _
source§ const column_rule_color: AttributeDiscription = _
source§ const column_rule_style: AttributeDiscription = _
source§ const column_rule_width: AttributeDiscription = _
source§ const column_span: AttributeDiscription = _
source§ const columns: AttributeDiscription = _
source§ const column_count: AttributeDiscription = _
source§ const column_width: AttributeDiscription = _
source§ const contain: AttributeDiscription = _
source§ const content: AttributeDiscription = _
source§ const counter_increment: AttributeDiscription = _
source§ const counter_reset: AttributeDiscription = _
source§ const counter_set: AttributeDiscription = _
source§ const cue_after: AttributeDiscription = _
source§ const cue_before: AttributeDiscription = _
source§ const cursor: AttributeDiscription = _
source§ const direction: AttributeDiscription = _
source§ const display: AttributeDiscription = _
source§ const display_inside: AttributeDiscription = _
source§ const display_outside: AttributeDiscription = _
source§ const display_extras: AttributeDiscription = _
source§ const display_box: AttributeDiscription = _
source§ const dominant_baseline: AttributeDiscription = _
source§ const elevation: AttributeDiscription = _
source§ const empty_cells: AttributeDiscription = _
source§ const enable_background: AttributeDiscription = _
source§ const fill_opacity: AttributeDiscription = _
source§ const fill_rule: AttributeDiscription = _
source§ const filter: AttributeDiscription = _
source§ const float_defer_column: AttributeDiscription = _
source§ const float_defer_page: AttributeDiscription = _
source§ const float_offset: AttributeDiscription = _
source§ const float_wrap: AttributeDiscription = _
source§ const flow_into: AttributeDiscription = _
source§ const flow_from: AttributeDiscription = _
source§ const flex_basis: AttributeDiscription = _
source§ const flex_grow: AttributeDiscription = _
source§ const flex_shrink: AttributeDiscription = _
source§ const flex_flow: AttributeDiscription = _
source§ const flex_direction: AttributeDiscription = _
source§ const flex_wrap: AttributeDiscription = _
source§ const flood_color: AttributeDiscription = _
source§ const flood_opacity: AttributeDiscription = _
source§ const font_family: AttributeDiscription = _
source§ const font_size: AttributeDiscription = _
source§ const font_stretch: AttributeDiscription = _
source§ const font_style: AttributeDiscription = _
source§ const font_weight: AttributeDiscription = _
source§ const font_feature_settings: AttributeDiscription = _
source§ const font_kerning: AttributeDiscription = _
source§ const font_size_adjust: AttributeDiscription = _
source§ const font_synthesis: AttributeDiscription = _
source§ const font_variant: AttributeDiscription = _
source§ const font_variant_caps: AttributeDiscription = _
source§ const font_variant_numeric: AttributeDiscription = _
source§ const font_variant_position: AttributeDiscription = _
source§ const footnote_policy: AttributeDiscription = _
source§ const grid_auto_flow: AttributeDiscription = _
source§ const grid_auto_columns: AttributeDiscription = _
source§ const grid_auto_rows: AttributeDiscription = _
source§ const grid_template: AttributeDiscription = _
source§ const grid_template_areas: AttributeDiscription = _
source§ const grid_template_columns: AttributeDiscription = _
source§ const grid_template_rows: AttributeDiscription = _
source§ const grid_area: AttributeDiscription = _
source§ const grid_column: AttributeDiscription = _
source§ const grid_column_start: AttributeDiscription = _
source§ const grid_column_end: AttributeDiscription = _
source§ const grid_row: AttributeDiscription = _
source§ const grid_row_start: AttributeDiscription = _
source§ const grid_row_end: AttributeDiscription = _
source§ const hanging_punctuation: AttributeDiscription = _
source§ const height: AttributeDiscription = _
source§ const hyphenate_character: AttributeDiscription = _
source§ const hyphenate_limit_chars: AttributeDiscription = _
source§ const hyphenate_limit_last: AttributeDiscription = _
source§ const hyphenate_limit_lines: AttributeDiscription = _
source§ const hyphenate_limit_zone: AttributeDiscription = _
source§ const hyphens: AttributeDiscription = _
source§ const image_orientation: AttributeDiscription = _
source§ const image_resolution: AttributeDiscription = _
source§ const image_rendering: AttributeDiscription = _
source§ const ime_align: AttributeDiscription = _
source§ const ime_mode: AttributeDiscription = _
source§ const ime_offset: AttributeDiscription = _
source§ const ime_width: AttributeDiscription = _
source§ const initial_letters: AttributeDiscription = _
source§ const inline_box_align: AttributeDiscription = _
source§ const isolation: AttributeDiscription = _
source§ const justify_content: AttributeDiscription = _
source§ const justify_items: AttributeDiscription = _
source§ const justify_self: AttributeDiscription = _
source§ const kerning: AttributeDiscription = _
source§ const letter_spacing: AttributeDiscription = _
source§ const lighting_color: AttributeDiscription = _
source§ const line_box_contain: AttributeDiscription = _
source§ const line_break: AttributeDiscription = _
source§ const line_grid: AttributeDiscription = _
source§ const line_height: AttributeDiscription = _
source§ const line_slack: AttributeDiscription = _
source§ const line_snap: AttributeDiscription = _
source§ const list_style: AttributeDiscription = _
source§ const list_style_image: AttributeDiscription = _
source§ const list_style_position: AttributeDiscription = _
source§ const list_style_type: AttributeDiscription = _
source§ const margin: AttributeDiscription = _
source§ const margin_bottom: AttributeDiscription = _
source§ const margin_left: AttributeDiscription = _
source§ const margin_right: AttributeDiscription = _
source§ const margin_top: AttributeDiscription = _
source§ const marker: AttributeDiscription = _
source§ const marker_end: AttributeDiscription = _
source§ const marker_mid: AttributeDiscription = _
source§ const marker_pattern: AttributeDiscription = _
source§ const marker_segment: AttributeDiscription = _
source§ const marker_start: AttributeDiscription = _
source§ const marker_knockout_left: AttributeDiscription = _
source§ const marker_knockout_right: AttributeDiscription = _
source§ const marker_side: AttributeDiscription = _
source§ const marquee_direction: AttributeDiscription = _
source§ const marquee_play_count: AttributeDiscription = _
source§ const marquee_speed: AttributeDiscription = _
source§ const marquee_style: AttributeDiscription = _
source§ const mask_image: AttributeDiscription = _
source§ const mask_repeat: AttributeDiscription = _
source§ const mask_position: AttributeDiscription = _
source§ const mask_clip: AttributeDiscription = _
source§ const mask_origin: AttributeDiscription = _
source§ const mask_size: AttributeDiscription = _
source§ const mask_box: AttributeDiscription = _
source§ const mask_box_outset: AttributeDiscription = _
source§ const mask_box_repeat: AttributeDiscription = _
source§ const mask_box_slice: AttributeDiscription = _
source§ const mask_box_source: AttributeDiscription = _
source§ const mask_box_width: AttributeDiscription = _
source§ const mask_type: AttributeDiscription = _
source§ const max_height: AttributeDiscription = _
source§ const max_lines: AttributeDiscription = _
source§ const max_width: AttributeDiscription = _
source§ const min_height: AttributeDiscription = _
source§ const min_width: AttributeDiscription = _
source§ const mix_blend_mode: AttributeDiscription = _
source§ const object_fit: AttributeDiscription = _
source§ const object_position: AttributeDiscription = _
source§ const offset_after: AttributeDiscription = _
source§ const offset_before: AttributeDiscription = _
source§ const offset_end: AttributeDiscription = _
source§ const offset_start: AttributeDiscription = _
source§ const opacity: AttributeDiscription = _
source§ const orphans: AttributeDiscription = _
source§ const outline: AttributeDiscription = _
source§ const outline_color: AttributeDiscription = _
source§ const outline_style: AttributeDiscription = _
source§ const outline_width: AttributeDiscription = _
source§ const outline_offset: AttributeDiscription = _
source§ const overflow: AttributeDiscription = _
source§ const overflow_x: AttributeDiscription = _
source§ const overflow_y: AttributeDiscription = _
source§ const overflow_style: AttributeDiscription = _
source§ const overflow_wrap: AttributeDiscription = _
source§ const padding: AttributeDiscription = _
source§ const padding_bottom: AttributeDiscription = _
source§ const padding_left: AttributeDiscription = _
source§ const padding_right: AttributeDiscription = _
source§ const padding_top: AttributeDiscription = _
source§ const page_break_after: AttributeDiscription = _
source§ const page_break_before: AttributeDiscription = _
source§ const page_break_inside: AttributeDiscription = _
source§ const paint_order: AttributeDiscription = _
source§ const pause_after: AttributeDiscription = _
source§ const pause_before: AttributeDiscription = _
source§ const perspective: AttributeDiscription = _
source§ const perspective_origin: AttributeDiscription = _
source§ const pitch_range: AttributeDiscription = _
source§ const play_during: AttributeDiscription = _
source§ const pointer_events: AttributeDiscription = _
source§ const position: AttributeDiscription = _
source§ const quotes: AttributeDiscription = _
source§ const region_fragment: AttributeDiscription = _
source§ const resize: AttributeDiscription = _
source§ const rest_after: AttributeDiscription = _
source§ const rest_before: AttributeDiscription = _
source§ const richness: AttributeDiscription = _
source§ const ruby_align: AttributeDiscription = _
source§ const ruby_merge: AttributeDiscription = _
source§ const ruby_position: AttributeDiscription = _
source§ const scroll_behavior: AttributeDiscription = _
source§ const scroll_snap_points_x: AttributeDiscription = _
source§ const scroll_snap_points_y: AttributeDiscription = _
source§ const scroll_snap_type: AttributeDiscription = _
source§ const shape_image_threshold: AttributeDiscription = _
source§ const shape_inside: AttributeDiscription = _
source§ const shape_margin: AttributeDiscription = _
source§ const shape_outside: AttributeDiscription = _
source§ const shape_padding: AttributeDiscription = _
source§ const shape_rendering: AttributeDiscription = _
source§ const speak_as: AttributeDiscription = _
source§ const speak_header: AttributeDiscription = _
source§ const speak_numeral: AttributeDiscription = _
source§ const speak_punctuation: AttributeDiscription = _
source§ const speech_rate: AttributeDiscription = _
source§ const stop_color: AttributeDiscription = _
source§ const stop_opacity: AttributeDiscription = _
source§ const stress: AttributeDiscription = _
source§ const string_set: AttributeDiscription = _
source§ const stroke: AttributeDiscription = _
source§ const stroke_dasharray: AttributeDiscription = _
source§ const stroke_dashoffset: AttributeDiscription = _
source§ const stroke_linecap: AttributeDiscription = _
source§ const stroke_linejoin: AttributeDiscription = _
source§ const stroke_miterlimit: AttributeDiscription = _
source§ const stroke_opacity: AttributeDiscription = _
source§ const stroke_width: AttributeDiscription = _
source§ const tab_size: AttributeDiscription = _
source§ const table_layout: AttributeDiscription = _
source§ const text_align: AttributeDiscription = _
source§ const text_align_all: AttributeDiscription = _
source§ const text_align_last: AttributeDiscription = _
source§ const text_anchor: AttributeDiscription = _
source§ const text_combine_upright: AttributeDiscription = _
source§ const text_decoration: AttributeDiscription = _
source§ const text_decoration_color: AttributeDiscription = _
source§ const text_decoration_line: AttributeDiscription = _
source§ const text_decoration_style: AttributeDiscription = _
source§ const text_decoration_skip: AttributeDiscription = _
source§ const text_emphasis: AttributeDiscription = _
source§ const text_emphasis_color: AttributeDiscription = _
source§ const text_emphasis_style: AttributeDiscription = _
source§ const text_emphasis_skip: AttributeDiscription = _
source§ const text_height: AttributeDiscription = _
source§ const text_indent: AttributeDiscription = _
source§ const text_justify: AttributeDiscription = _
source§ const text_orientation: AttributeDiscription = _
source§ const text_overflow: AttributeDiscription = _
source§ const text_rendering: AttributeDiscription = _
source§ const text_shadow: AttributeDiscription = _
source§ const text_size_adjust: AttributeDiscription = _
source§ const text_space_collapse: AttributeDiscription = _
source§ const text_spacing: AttributeDiscription = _
source§ const text_transform: AttributeDiscription = _
source§ const text_wrap: AttributeDiscription = _
source§ const touch_action: AttributeDiscription = _
source§ const transform: AttributeDiscription = _
source§ const transform_box: AttributeDiscription = _
source§ const transform_origin: AttributeDiscription = _
source§ const transform_style: AttributeDiscription = _
source§ const transition: AttributeDiscription = _
source§ const transition_delay: AttributeDiscription = _
source§ const transition_duration: AttributeDiscription = _
source§ const transition_property: AttributeDiscription = _
source§ const unicode_bidi: AttributeDiscription = _
source§ const vector_effect: AttributeDiscription = _
source§ const vertical_align: AttributeDiscription = _
source§ const visibility: AttributeDiscription = _
source§ const voice_balance: AttributeDiscription = _
source§ const voice_duration: AttributeDiscription = _
source§ const voice_family: AttributeDiscription = _
source§ const voice_pitch: AttributeDiscription = _
source§ const voice_range: AttributeDiscription = _
source§ const voice_rate: AttributeDiscription = _
source§ const voice_stress: AttributeDiscription = _
source§ const voice_volumn: AttributeDiscription = _
source§ const volume: AttributeDiscription = _
source§ const white_space: AttributeDiscription = _
source§ const widows: AttributeDiscription = _
source§ const will_change: AttributeDiscription = _
source§ const word_break: AttributeDiscription = _
source§ const word_spacing: AttributeDiscription = _
source§ const word_wrap: AttributeDiscription = _
source§ const wrap_flow: AttributeDiscription = _
source§ const wrap_through: AttributeDiscription = _
source§ const writing_mode: AttributeDiscription = _
source§ const list_styler_type: AttributeDiscription = _
source§ const row_gap: AttributeDiscription = _
source§ const user_select: AttributeDiscription = _
source§ const webkit_user_select: AttributeDiscription = _
source§ const z_index: AttributeDiscription = _
source§ const aria_current: AttributeDiscription = _
source§ const aria_details: AttributeDiscription = _
source§ const aria_disabled: AttributeDiscription = _
source§ const aria_invalid: AttributeDiscription = _
source§ const aria_keyshortcuts: AttributeDiscription = _
source§ const aria_label: AttributeDiscription = _
source§ const aria_roledescription: AttributeDiscription = _
source§ const aria_autocomplete: AttributeDiscription = _
source§ const aria_checked: AttributeDiscription = _
source§ const aria_expanded: AttributeDiscription = _
source§ const aria_haspopup: AttributeDiscription = _
source§ const aria_level: AttributeDiscription = _
source§ const aria_modal: AttributeDiscription = _
source§ const aria_multiline: AttributeDiscription = _
source§ const aria_multiselectable: AttributeDiscription = _
source§ const aria_orientation: AttributeDiscription = _
source§ const aria_placeholder: AttributeDiscription = _
source§ const aria_pressed: AttributeDiscription = _
source§ const aria_readonly: AttributeDiscription = _
source§ const aria_required: AttributeDiscription = _
source§ const aria_selected: AttributeDiscription = _
source§ const aria_sort: AttributeDiscription = _
source§ const aria_valuemax: AttributeDiscription = _
source§ const aria_valuemin: AttributeDiscription = _
source§ const aria_valuenow: AttributeDiscription = _
source§ const aria_valuetext: AttributeDiscription = _
source§ const aria_atomic: AttributeDiscription = _
source§ const aria_busy: AttributeDiscription = _
source§ const aria_live: AttributeDiscription = _
source§ const aria_relevant: AttributeDiscription = _
source§ const aria_dropeffect: AttributeDiscription = _
source§ const aria_grabbed: AttributeDiscription = _
source§ const aria_activedescendant: AttributeDiscription = _
source§ const aria_colcount: AttributeDiscription = _
source§ const aria_colindex: AttributeDiscription = _
source§ const aria_colspan: AttributeDiscription = _
source§ const aria_controls: AttributeDiscription = _
source§ const aria_describedby: AttributeDiscription = _
source§ const aria_errormessage: AttributeDiscription = _
source§ const aria_flowto: AttributeDiscription = _
source§ const aria_labelledby: AttributeDiscription = _
source§ const aria_owns: AttributeDiscription = _
source§ const aria_posinset: AttributeDiscription = _
source§ const aria_rowcount: AttributeDiscription = _
source§ const aria_rowindex: AttributeDiscription = _
source§ const aria_rowspan: AttributeDiscription = _
Auto Trait Implementations§
§ impl RefUnwindSafe for div
§ impl Send for div
§ impl Sync for div
§ impl Unpin for div
§ impl UnwindSafe for div
Blanket Implementations§
source§ impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§ fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§ impl<T> Instrument for T
source§ fn instrument(self, span: Span) -> Instrumented<Self>
source§ fn in_current_span(self) -> Instrumented<Self>
source§ impl<T> WithSubscriber for T
source§ fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§ fn with_current_subscriber(self) -> WithDispatch<Self>
- The