FloatLabel API

API documentation for FloatLabel component

FloatLabel#

Props#

Defines valid properties in FloatLabel component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: FloatLabelInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: FloatLabelInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<FloatLabelPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: FloatLabelInstance) => ReactNode)
null
The children to render.
variant"on" | "in" | "over"
over
Defines the positioning of the label relative to the input.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of FloatLabel component.

nametypedefaultdescription
rootFloatLabelPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of FloatLabel component.

values
ComponentInstance<FloatLabelProps, FloatLabelState, FloatLabelExposes>

Label#

Props#

Defines valid properties in Label component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: LabelInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: LabelInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<LabelPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: LabelInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of Label component.

nametypedefaultdescription
rootLabelPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
iftaLabelPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the ifta's DOM element.
floatLabelPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the float's DOM element.

Types#

Instance of Label component.

values
ComponentInstance<LabelProps, LabelState, LabelExposes>

useLabel#

Types#

Instance of useLabel headless.

values
HeadlessInstance<useLabelProps, useLabelState, useLabelExposes>