Skip to content

Apply border radius to inner view(progress bar) when applying padding to <Progress.Bar /> #240

Open

Description

@hdwts

Que : How to apply border raduis to inner view of progress bar

Version

"react": "16.13.1",
"react-native": "0.63.4",
"react-native-progress": "^5.0.0",

Expected output
Screenshot

Current behaviour
current_output
Code

<Progress.Bar
  color={'rgb(128,0,128)'}
  progress={0.5}
  borderWidth={1}
  borderColor={'rgba(128,0,128,0.2)'}
  unfilledColor={'white'}
  height={10}
  borderRadius={7.5}
  width={200}
  style={{ padding: 2, }}
/>

So after applying style with padding 2 I'll get the space for inner view
but when I try below code it wont work for me

style={{ padding: 2,borderRadius:10 }}

So how apply border radius for inner view as per expected output

Activity

  1. erickgtzh commented on Mar 8, 2022

    @erickgtzh

    Did you find a solution?

  2. matandin commented on Mar 22, 2022

    @matandin

    @erickgtzh @hardik-wts Did you guys find a solution?

  3. paulolopesrb commented on Apr 14, 2022

    @paulolopesrb

    Has anyone got a solution? I have the same issue.

  4. Srijan67 commented on Jan 27, 2023

    @Srijan67

    I had similar problem, I solved it by going to react-native-progress/bar file and adding borderRadius to progressStyle. It will give similar border as your outer container.
    image

  5. luisfuertes commented on Jul 31, 2023

    @luisfuertes

    And somebody know how do the same with Circle? Thanks!

  6. pncuong03 commented on Jan 24, 2025

    @pncuong03

    If this happens in the production environment, it will be lost. This method is not very good. Does anyone handle it differently? @Srijan67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions