Skip to content

[docs] Add examples showing how to position native validation tooltips #3828

@LukasTy

Description

@LukasTy

It's clear that there is a need to improve the documentation and/or DX regarding properly placing the native validation tooltip on components using a hidden native input.
This mainly concerns Select, Combobox, and Number Field components.

Just reviewed the code. Cool so you're essentially doing the same:

  1. !important
  2. a selector to target the hidden input
  & + input[aria-hidden='true'] {
    width: 100% !important;
    padding-left: 0.875rem !important;
  }

My only ask would be to expose a prop like hiddenInputStyles: { width: '100%', paddingLeft: '0.875rem' } (or hiddenInputStyleOverrides etc.) so you wouldn't have to resort to !important or figure out the right selector to target the hidden input.

Originally posted by @NMinhNguyen in #3718

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to the documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions