Is there "disabled" attribute for grafana ui components

I am using <Segment/> from @grafana/ui.I would like to know is there a way to make this component disabled based on the certain value of state,because i was unable to find the disabled attribute in <Segment/>

Hello @abhinandan13

Please try regular disabled attribute:

<Segment disabled={value} ...

I use it for UI component:


@vsergeyev thanks for the reply,but when i use the disable attribute in <Segment> i get an error saying

Property ‘disabled’ does not exist on type ‘IntrinsicAttributes & SegmentSyncProps & { children?: ReactNode; }’.

Here is a snapshot of my code

Segment doesn’t have a disabled prop. You can se the list of the available props at grafana/ui storybook page:

Setting className or overriding onChange may help to make it disabled: