Edit UI index and preview