Inplace API

API documentation for Inplace component

Inplace#

Props#

Defines valid properties in Inplace component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: InplaceInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: InplaceInstance) => 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<InplacePassThrough>
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: InplaceInstance) => ReactNode)
null
The children to render.
disabledboolean
false
When present, it specifies that the element should be disabled.
activeboolean
false
Whether the content is displayed or not.
onActiveChange(active: boolean) => void
null
Callback function that is called when the element is clicked.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in Inplace component.

nametypedefaultdescription
activeboolean
null
The active state of the useInplace.

Exposes#

Defines the methods and properties exposed by Inplace component.

nametypedefaultdescription
stateuseInplaceState
null
The state of the useInplace.
open() => void
null
Method to open the inplace.
close() => void
null
Method to close the inplace.
onActiveChange() => void
null
Method to handle the active change event.

Events#

Event fired when the Inplace's checked state changes.

nametypedescription
valueunknownValue of the Inplace.
activebooleanThe active state of the inplace.

Interfaces#

Defines passthrough(pt) options of Inplace component.

nametypedefaultdescription
rootInplacePassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
contentInplacePassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the content's DOM element.
displayInplacePassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the display's DOM element.
closeInplacePassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the close's DOM element.

Types#

Instance of Inplace component.

values
ComponentInstance<InplaceProps, InplaceState, InplaceExposes>

InplaceDisplay#

Props#

Defines valid properties in InplaceDisplay component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: InplaceDisplayInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: InplaceDisplayInstance) => 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<InplaceDisplayPassThrough>
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: InplaceDisplayInstance) => 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.

Exposes#

Defines the methods and properties exposed by InplaceDisplay component.

nametypedefaultdescription
inplaceInplaceInstance
null
The Inplace component instance.

Interfaces#

Defines passthrough(pt) options of InplaceDisplay component.

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

Types#

Instance of InplaceDisplay component.

values
ComponentInstance<InplaceDisplayProps, InplaceDisplayState, InplaceDisplayExposes>

InplaceContent#

Props#

Defines valid properties in InplaceContent component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: InplaceContentInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: InplaceContentInstance) => 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<InplaceContentPassThrough>
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: InplaceContentInstance) => 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.

Exposes#

Defines the methods and properties exposed by InplaceContent component.

nametypedefaultdescription
inplaceInplaceInstance
null
The Inplace component instance.

Interfaces#

Defines passthrough(pt) options of InplaceContent component.

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

Types#

Instance of InplaceContent component.

values
ComponentInstance<InplaceContentProps, InplaceContentState, InplaceContentExposes>

useInplace#

Props#

Defines valid properties in useInplace.

nametypedefaultdescription
activeboolean
false
Whether the content is displayed or not.
onActiveChange(active: boolean) => void
null
Callback function that is called when the element is clicked.

State#

Defines valid state in useInplace.

nametypedefaultdescription
activeboolean
null
The active state of the useInplace.

Exposes#

Defines the methods and properties exposed by useInplace.

nametypedefaultdescription
stateuseInplaceState
null
The state of the useInplace.
open() => void
null
Method to open the inplace.
close() => void
null
Method to close the inplace.
onActiveChange() => void
null
Method to handle the active change event.

Events#

Event fired when the checkbox's checked state changes.

nametypedescription
activebooleanThe active state of the inplace.

Types#

Instance of useInplace headless.

values
HeadlessInstance<useInplaceProps, useInplaceState, useInplaceExposes>